Create and map the ADC schema and queries
- Last Updated: February 1, 2019
- 2 minute read
- Corticon
- Documentation
Note: Using the sample: For the ADC sample, you
need to have executed the Corticon SQL scripts
patient and adc for your database in
your database management tool's editor. The sample's metadata, primary keys, and
join expressions are already mapped to the database.Create the schema in the database
Typically, the database administrator creates the tables in the namespace, 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
- Define the database tables that will participate in rules as Corticon entities.
For the sample, the first table is
Patient:
- Add the required columns for that table as Corticon attributes with corresponding data types.
- 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:

- Add additional tables, such as the sample's
Treatmenttable:
- 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:

- 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.
For more about mapping, see Mapping ADC database metadata.