skip to main content
Corticon Server: Data Integration Guide : Getting Started with Multiple Database Connectivity : Create and map the multiple database schema
 

Try Corticon Now

Create and map the multiple database schema

Note: Using the sample: For the Multiple Database sample, you need to have executed the Corticon SQL scripts patient, adc and cms for your database in your database management tool's editor. The metadata, primary keys, and join expressions are already mapped to the database.

Create the schema in the databases

Typically, the database administrator creates the tables in the namespaces, and then the columns with their data types, the declared primary key, and any joins between tables.

Create the entities and their identity, then their attributes, and associations

1. Define the database tables that will participate in rules as Corticon entities. For the sample, the first table is Patient:
2. Add the required columns for that table as Corticon attributes with corresponding data types.
3. Specify the Primary Key (PK) in the database table as the Entity Identity by clicking the Entity Identity Property Value to open its menu, and then choose from the listed attributes, as shown:
4. Add additional tables, such as the sample's Treatment table:
5. Specify its Primary Key (PK) in the database table as the Entity Identity by clicking the Entity Identity Property Value to open its menu, and then choose from the listed attributes, as shown:
6. The Treatment entity also links to another database through the attribute medicalCode
7. Each medicalCode needs to link to the Primary Key (PK) TreatmentCode in the table TreatmentDetails in the CMSDetail database
8. In Corticon Studio on the Vocabulary's Datasource tab, click METADATA: Import. The mapping metadata from the database is added into the Vocabulary for the Entities (tables), Attributes (columns), and Associations (join expressions). If the imported tables and columns do not align with entities and their attributes, those values will require manual mapping.
9. One such case is noted here. SmartMatching won't infer the table name through a link based on an attribute so you need to pull down the Table Name options to choose CMSDetail.dbo.TreatmentDetails table, as illustrated:
If other imported tables and columns do not align with entities and their attributes, those values will require manual mapping. For more about mapping, see Mapping ADC database metadata.