This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
admin:features:attach:databases [2012/02/29 21:48] doc created |
admin:features:attach:databases [2016/06/28 22:38] (current) |
||
---|---|---|---|
Line 16: | Line 16: | ||
==== Attaching Databases ==== | ==== Attaching Databases ==== | ||
+ | Omnidex allows entire databases to be attached to the current Omnidex Environment, incorporating all of their tables and Omnidex indexes. This can greatly expand the data available to query, and enhance the ability to optimize queries across multiple databases within the enterprise. Any type of database from any Omnidex Environment can be attached. This allows great flexibility in linking multiple applications together, such as linking a SQL Server customer database with a Raw Data File data warehouse. | ||
+ | Attaching databases can also be useful for applications that reference the results from previous queries in future queries. If the result set consists of a single column, such as a primary key, this can be done simply using [[admin:features:segments:home|Omnidex Segments]]; however, some applications identify the results of a previous query using multiple columns, or even multiple tables. Omnidex allows these results to be rendered into a miniature Omnidex database, complete with Omnidex indexing. Future queries can attach as many result set databases as needed to perform order suppression or other tasks, all taking advantage of the Omnidex indexes. | ||
+ | |||
+ | Attaching a database is simple, and uses the ATTACH DATABASE statement, as shown below: | ||
+ | |||
+ | <code> | ||
+ | > connect to simple | ||
+ | Connected to D:\class\labs\attach\simple.xml | ||
+ | |||
+ | > attach database GEO | ||
+ | >> from geo.xml; | ||
+ | Database GEO attached | ||
+ | </code> | ||
+ | |||
+ | The newly attached database can be see using the SHOW TABLES command in OdxSQL: | ||
+ | |||
+ | <code> | ||
+ | > show tables | ||
+ | |||
+ | Tables | ||
+ | ------ | ||
+ | |||
+ | Environment | ||
+ | Database | ||
+ | Table Length Cols Rows Type | ||
+ | ---------------------------------------------------------------------------- | ||
+ | USER_ENVIRONMENT | ||
+ | SIMPLE | ||
+ | COUNTRIES 98 7 239 FIXED | ||
+ | STATES 44 6 76 FIXED | ||
+ | GENDERS 33 2 2 FIXED | ||
+ | HOUSEHOLDS 99 6 1,909 FIXED | ||
+ | INDIVIDUALS 159 7 5,000 FIXED | ||
+ | $TEMPDB | ||
+ | GEO | ||
+ | COUNTRIES 98 7 239 FIXED | ||
+ | REGIONS 36 4 12 FIXED | ||
+ | STATES 44 6 76 FIXED | ||
+ | COUNTIES 50 9 3,241 FIXED | ||
+ | ZIPCODES 76 11 42,474 FIXED | ||
+ | |||
+ | </code> | ||
==== ==== | ==== ==== | ||
Line 24: | Line 66: | ||
====== Additional Resources ====== | ====== Additional Resources ====== | ||
- | |||
See also: | See also: | ||