skip to main content
Corticon Studio: Rule Modeling Guide : Filters and preconditions : What is a filter? : Database filters
 

Try Corticon Now
Database filters
When an entity has its Datastore Persistent property set to Yes in the Vocabulary, it places a database cylinder decoration on the entity and its attributes, as shown:
Once that is set, right-clicking on a Entity's alias in a Rulesheet's Scope section presents the menu command to Extend to Database, as shown:
Then you can define filters and set them each as a Database Filter, as shown:
When checked, the filter becomes a database query that will retrieve data from the connected database, and then add the retrieved data to working memory.
When the option is cleared, the filter is applied only to data currently in working memory.
Note: See Precondition and Filters as query filters for qualifications and supported operators.
Database filters in an execution sequence diagram
When you choose Rulesheet > Logical Analysis > Execution Sequence Diagram, the graphic that is generated distinguishes a database filter from local filter by its shape:
In this example, F.1, the database query, is displayed within a triangle while F.2, the local filter, is displayed within an inverted trapezoid (a quadrilateral with parallel horizontal bases and legs that converge downward.)
Error Conditions
It is important to note that you could set a database filter on an entity that is not Datastore Persistent or extended to database, but if you do so, the filter is marked in red, as shown. The error notes that the filter cannot be processed by a database.