toolkit-labengine

The LABengine (Labrador engine) is the central component in the Labrador suite.  Its main purpose is to implement a high-level query language that permits application developers to write effective SQL queries with a minimum of domain-specific and model-specific knowledge.  A significant function of the LABengine is to automatically generate the correct SQL encoding of relationships between data model entities.  For example, a Labrador query such as:

manager name,
employee name

might expand to the SQL statement:

SELECT
    S0.EMP_NAME,
    S2.EMP_NAME
FROM
    STAFF AS S0
JOIN
    STAFF_GROUP AS SG1 ON (SG1.MGR_ID=S0.EMP_ID)
JOIN
    STAFF AS S2 ON (S2.GROUP_ID=SG1.ID)
WHERE
    S0.EMP_TYPE IN ('MANAGER','SUPERVISOR','EXECUTIVE')

This example illustrates that an application developer can express a query in high-level terms, using a vocabulary that is closer to that of the domain of interest than raw SQL.  It also shows that Labrador can infer the relationships between the entities 'manager' and 'employee'.  A close reading of the generated SQL reveals that a third entity, 'group', was implied as part of the relationship between manager and employee, an employee working in a group managed by the manager.  Labrador queries may also explicitly specify such relationships, still in high level terms:

manager name,
employee[in group managed-by manager] name

This example only touches upon LABengine functionality.  Below is a list of the major LABengine features.  The LABengine:

implements a high-level query language that hides much of the structural detail of a SQL database.  Conditions, outer joins, distinctness, sorting, and aggregation are supported.
stores the logical data model associated with a database, in terms of entities, relationships, and attributes.
can retrieve data any JDBC and ODBC databases.  It can create SQL statements using ANSI (JDBC/ODBC), Oracle, or SQL Server syntax.
supports entities that are mapped to complete SQL tables, or mapped to certain rows from an SQL table as selected by an arbitrary SQL expression.
supports attributes generated from SQL columns, by SQL expressions, or by code written in scripting languages or Java.
supports relationships represented by equi-joins or by more complex SQL expressions.  The SQL that represents a relationship may be defined at design time or computed at run-time by code written in script or Java.  A number of common relationship types are provided by the LABengine.
allows the modeller to assign both programmatic and user-visible names to all entities, relationships, and attributes.  Both names are intended to be more descriptive than the names of the corresponding SQL objects, but programmatic names are aimed at developers and are intended to remain static for long periods of time so that they can be reliably referenced in code.
can infer relationships between entities that are not explicitly specified in the query.  The modeller can weight the various paths between entities at design time.  The weight assigned to any given relationship can vary depending upon which direction the relationship is traversed.  In cases where there is no clear default path between two entities, the LABengine can enumerate the possible choices to allow an external agency (such as the end-user) to decide.
generates SQL statements that are optimized for performance using decisions based upon database population data, relationship cardinality and selectivity, etc.  The LABengine framework has hooks in place to support optimization strategies tailored to each database engine.
allows real-valued attributes to be assigned units of measurement in both SI and 'alternate' unit systems.  Unit conversion services are provided.  User-defined units of measurement are supported.  The units of measurement associated with an attribute may be computed at run-time on a row-by-row basis.
allows entities to be grouped into categories for presentation to the end user.


For more information on the LABengine™, or any other Labrador Technologies product, please contact a Labrador Technologies sales representative at 1-877-990-DATA

Back to Labrador Tools