The Oracle Commerce Platform SQL repository can be used to connect Oracle Commerce Platform 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 Oracle Commerce Platform application as Dynamic Beans. The uses of an SQL repository can be as varied as the uses of a relational database.
The Oracle Commerce Platform includes SQL repositories that store:
User profiles (the Personalization module’s SQL Profile Repository). See the SQL Profile Repositories chapter in the 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 Platform Programming Guide.
In addition, Core Commerce uses repositories that store the following:
Store catalog
In-process orders
Inventory
Gift lists and wish lists
Pricing and promotions
Refer to the Core Commerce Programming Guide for information about these repositories.
The Oracle Commerce 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 Oracle Commerce 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.