skip to main content
Corticon Server: Integration & Deployment Guide : Relational database concepts in the Enterprise Data Connector (EDC) : Key assignments
 

Try Corticon Now

Key assignments

Key designations occur automatically once an entity identity has been defined in the Vocabulary Editor.

Primary Key

If the chosen (or auto-mapped) entity identity appears in the Vocabulary as an attribute (see Application identity), then that attribute receives an asterisk character to the right of its node in the Vocabulary's TreeView. Attributes with asterisks are part of the entity’s primary key as shown in Automatic Mapping of Vocabulary Entity.
If the chosen (or auto-mapped) entity identity does not appear in the Vocabulary as an attribute see Datastore identity), then no attribute receives an asterisk character. None of the attributes in the Vocabulary are part of the entity’s primary key, as shown in Automatic Mapping of Datastore Identity Column. This causes complications when testing and invoking Decision Services with connected databases. If no primary key is visible in the Vocabulary, then how do we indicate in an unambiguous way the specific records(s) to be used by the Decision Service?
In the Studio Test, an entity using Datastore identity has its key set in the entity’s Properties window. The following figure shows that the Ruletest was chosen. Right-clicking on first Cargo entity, and choosing Properties on the menu opened the Properties tab where the Datastore ID side tab was selected. The value 23 was entered for the test:
Figure 308. Setting the Identity for Entities Using Datastore Identity
When we export the ruletest to XML (Ruletest > Testsheet > Data > Output > Export Response XML) illustrates how this Database ID appears in the XML message. In the following figure, we see how the Database ID value is included in the XML as an attribute (an XML attribute, not a Vocabulary attribute). Your XML toolset and client may need to insert this data into a CorticonRequest message.
Figure 309. Datastore Identity inside the XML Request

Foreign Key

Foreign key relationships between database tables are represented in the Vocabulary via association mappings. As we see in Manual Mapping of Vocabulary Association , the association mappings are entered (or auto-mapped) in the Join Expression field.

Composite Key

Multiple keys may be selected (if not auto-mapped) by choosing the Select All option, or by holding the Control key while clicking on all the items you want on the Entity Identity drop-down. If multiple selections are made, then all Vocabulary attributes will have asterisk characters to indicate that they are part of the primary key.