Reading records from a database using a primary key
- Last Updated: March 26, 2025
- 1 minute read
- Corticon
- Version 7.1
- Version 6.3
- Documentation
Reading records from a database using a primary key
Once entities and attributes in a Vocabulary are mapped to a database, any rule that uses those entities or attributes automatically accesses the database’s tables.
When it comes to reading records, there are two high-level scenarios:
- When you need to retrieve a specific record. To do this, the rule needs to receive a primary key value in input data and use it to retrieve the record.
- When you need to retrieve all records from multiple tables and compare record values across tables. In this case, you do not need a primary key.
Let’s take a look how to model a rule to retrieve a record using a primary key.