The ATG SQL repository can be used to connect ATG applications to an SQL database. An SQL database provides fast, scalable storage and retrieval of persistent information. The SQL repository works with an SQL database to store objects and make those objects visible inside an ATG application as Dynamic Beans. The uses of an SQL repository can be as varied as the uses of a relational database.
The ATG platform includes SQL repositories that store:
User profiles (the Personalization module’s SQL Profile Repository). See the SQL Profile Repositories chapter in the ATG Personalization Programming Guide.
Web site content (the SQL content repository). See this chapter and the SQL Content Repositories chapter.
Security profiles used by the Administrative Security system. See the Managing Access Control chapter of the ATG Programming Guide.
In addition, an ATG Commerce site uses repositories that store:
Store catalog. See the Using and Extending the Default Catalog in the ATG Commerce Programming Guide.
In-process orders. See the ConfiguringPurchase Process Services chapter in the ATG Commerce Programming Guide.
Inventory. See the Inventory Framework chapter in the ATG Commerce Programming Guide.
Gift lists and wish lists. See the Configuring Merchandising Services chapter in the ATG Commerce Programming Guide.
Pricing and promotions. See the Using and Extending Pricing Services chapter in the ATG Commerce Programming Guide.
The ATG platform includes a component at /atg/registry/ContentRepositories
that instantiates the class atg.repository.nucleus.RepositoryRegistryService
, which maintains a list of all registered SQL content repositories.
Repository setup steps
You set up an SQL repository on the ATG platform in the following steps:
Create the repository definition file to be used by the SQL repository.
This template is an XML file that defines repository item descriptors and their attributes, and describes the relationship of your SQL repository to the SQL database. While the SQL repository can represent a variety of data models, it cannot easily represent any arbitrary data model. Thus, it is usually a good idea to design the SQL repository schema before you design your SQL database schema.
The SQL Repository Data Models and SQL Repository Item Properties chapters describe how to design item descriptors and other SQL repository elements. See also the SQL Repository Definition Tag Reference for details about the XML tags used to create the SQL repository definition file.
Configure an SQL Repository component.
This component’s
definitionFiles
property points to the repository definition file. For detailed information, see Configuring the SQL Repository Component.Create the SQL database schema on your SQL database server.
You can use the startSQLRepository script with the
–outputSQL
option to generate a preliminary form of the SQL needed to create the database schema, then edit the output to optimize the database schema.