This is an old revision of the document!
Raw data files often supplement a relational database. For example, a transaction log or a supplemental data file may contain information that is ideal to correlate with a relational database. Companies that have been importing that data into the relational database can avoid that extra work, and use Omnidex to join those two data sources together instead.
An Omnidex Environment File can include more than one database, and each database can be of a different type. An Omnidex Environment File can have one database that points to the underlying relational database, and a second database that points to a series of raw data files. When connected to this Omnidex Environment File, applications can issue SQL statements that join tables from both databases.
Omnidex allows joins between tables that point to raw data files. These are performed using standard SQL statements. Multiple types of table joins are allowed, including inner joins, outer joins and cross joins.
Table joins are often performed on columns that are referenced in primary and foreign key constraints. An Omnidex Environment against raw data files can include primary and foreign key constraints, just like an environment against a relational database. When these constraints are declared, Omnidex will honor the declared constraints, though it will not verify or enforce them.
When a raw data file has one or more columns that uniquely identify each row, they can be declared as a primary key. Omnidex will rely on primary key definitions, so do not declare a primary key unless it is truly unique.
Raw data files can also include foreign key constraints. Omnidex will also rely on foreign key definitions; however, it is also tolerant of minor errors in foreign key integrity. Raw data files often come from multiple suppliers, and the data may not exactly match. It is fine to declare a foreign key constraint in these situations as long as the differences are relatively minor. Note that errors in foreign key integrity may affect performance.
Omnidex requires that the datatypes of foreign keys match those of the corresponding primary key.
CREATE TABLE "COUNTRIES" physical "dat/countries.dat" ( "COUNTRY" CHARACTER(2), "DESCRIPTION" STRING(47), "LATITUDE" FLOAT usage "LATITUDE", "LONGITUDE" FLOAT usage "LONGITUDE", "CAPITAL" STRING(31), "CAPITAL_LAT" FLOAT usage "LATITUDE", "CAPITAL_LONG" FLOAT usage "LONGITUDE", CONSTRAINT COUNTRIES_COUNTRY_PK PRIMARY ("COUNTRY") ) IN "simple.xml"; CREATE TABLE "STATES" physical "dat/states.dat" ( "STATE" CHARACTER(2), "DESCRIPTION" STRING(31), "STATE_CODE" CHARACTER(2), "REGION" CHARACTER(2), "COUNTRY" CHARACTER(2), "TAX_RATE" FLOAT, CONSTRAINT STATES_STATE_PK PRIMARY ("STATE"), CONSTRAINT STATES_COUNTRY_FK FOREIGN ("COUNTRY") REFERENCES "COUNTRIES" ) IN "simple.xml";
See also: