FEQL Query Concepts
FactEngine Query Language (FEQL) is a query language designed specifically for ad hoc and bespoke queries against data warehouses/lakes and any database where you need access to information in a fast and convenient manner.
The following is an example FEQL query.
There are three types of concept to use when creating a FactEngine Query Language statement:
- ModelElementName;
- Predicate
- PropertyNodeIdentification
ModelElementName
When querying a database Model Elements are commensurate to Tables, Nodes and Attributes in your database.
- Entity Relationship Diagrams have Entity and Attribute model elements.
- Property Graph Schemas have Node and Property model elements.
Schemas created using Fact-Based Modeling, as used by FactEngine, consist of model elements, such as Entity Types, Value Types and Objectified Fact Types. Role Constraints and Roles, for instance, are also model elements.
So when querying a database you relate the model elements in your conceptual models in FactEngine/Boston to their corresponding model elements within your database. The name of each model element is called a ModelElementName within the syntax descriptions in this documentation. For example, the following FactEngine query has Lecturer, Room, Position, School and Faculty as ModelElementNames.
Suffixes
Note that each ModelElementName can have a suffix, such as in "2" in "Issue 2" as in the following query:
Predicates
As the name suggests, Predicates are the predicates of your conceptual models in Boston.
The query above has the following predicates;
- occupies
- holds
- is in
- works for
Property Node Identification
If you need to identify a particular data item in your database you do that with a PropertyNodeIdentification clause.
In the example query above, (Faculty:'IT') finds a particular Faculty row/node in your database that is uniquely identified by the value, 'IT', and where the first unique index of the node/table is used to find the appropriate attribute/property value to match with that value.
FactEngine Query Language has three standard comparators, Equals, Not Equals and LIKE.
They are implemented as part of the syntax for Property Node Identification.
Equals comparator
The colon, :, is used for equals.
Not Equal/s comparator
The bang, !, symbol is used for Not Equals.
LIKE comparator
The tilde, ~, symbol is used for the LIKE comparator.