This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
integration:rdbms:odbc:example [2011/04/07 03:26] 127.0.0.1 external edit |
integration:rdbms:odbc:example [2016/06/28 22:38] (current) |
||
|---|---|---|---|
| Line 21: | Line 21: | ||
| ==== Example ==== | ==== Example ==== | ||
| - | The following example is a simple database accessed using Omnidex's Generic ODBC interface. The Omnidex Environment File is displayed below; however, the entire example can be downloaded as a ZIP file at the following link: **{{:integration:rdbms:odbc:odbc_example.zip|Download ZIP File}}**. This ZIP file also includes files that can be used to create a MySQL database as as a test database. Note that the Generic ODBC driver is designed to work with a wide variety of underlying database types and is not limited to ODBC. | + | The following example shows Omnidex on a simple database accessed through a generic ODBC driver. The Omnidex Environment File is displayed below; however, the entire example can be downloaded as a ZIP file at the following link: **{{:integration:rdbms:odbc:odbc_example.zip|Download ZIP File}}**. This ZIP file also includes files that can be used to create a MySQL database as as a test database. Note that MySQL is used as a convenient and popular example of a database with an ODBC driver; however, Omnidex is designed to work with a wide variety of underlying database types and is not limited to ODBC. Also note that Omnidex describes more direct support for MySQL in the [[integration:rdbms:mysql:home|MySQL Integration Guide]]. |
| - | The following statements will create and build an Omnidex Environment against an underlying database to be accessed using the Generic ODBC interface: | + | The following statements will create and build an Omnidex Environment against an underlying database to be accessed through its ODBC driver: |
| <code> | <code> | ||
| > use sql/create_all.sql | > use sql/create_all.sql | ||
| Line 95: | Line 95: | ||
| >> constraint HOUSEHOLDS_HOUSEHOLD_PK primary ("HOUSEHOLD"), | >> constraint HOUSEHOLDS_HOUSEHOLD_PK primary ("HOUSEHOLD"), | ||
| >> constraint HOUSEHOLDS_STATE_FK foreign ("STATE") references "STATES", | >> constraint HOUSEHOLDS_STATE_FK foreign ("STATE") references "STATES", | ||
| - | >> constraint HOUSEHOLDS_COUNTRY_FK foreign ("COUNTRY") references "COUNTRIES" | + | >> constraint HOUSEHOLDS_COUNTRY_FK foreign ("COUNTRY") references "COUNTRIES", |
| - | , | + | |
| >> native HOUSEHOLDS_HOUSEHOLD_IDX ("HOUSEHOLD") | >> native HOUSEHOLDS_HOUSEHOLD_IDX ("HOUSEHOLD") | ||
| >> ) | >> ) | ||
| Line 113: | Line 112: | ||
| >> "EMAIL" CHARACTER(60) quicktext, | >> "EMAIL" CHARACTER(60) quicktext, | ||
| >> constraint INDIVIDUALS_INDIVIDUAL_PK primary ("INDIVIDUAL"), | >> constraint INDIVIDUALS_INDIVIDUAL_PK primary ("INDIVIDUAL"), | ||
| - | >> constraint INDIVIDUALS_HOUSEHOLD_FK foreign ("HOUSEHOLD") references "HOUSE | + | >> constraint INDIVIDUALS_HOUSEHOLD_FK foreign ("HOUSEHOLD") references "HOUSEHOLDS", |
| - | HOLDS", | + | |
| >> constraint INDIVIDUALS_GENDER_FK foreign ("GENDER") references "GENDERS", | >> constraint INDIVIDUALS_GENDER_FK foreign ("GENDER") references "GENDERS", | ||
| >> native INDIVIDUALS_INDIVIDUAL_IDX ("INDIVIDUAL") | >> native INDIVIDUALS_INDIVIDUAL_IDX ("INDIVIDUAL") | ||