This shows you the differences between two versions of the page.
admin:indexing:creation:declaring [2012/01/25 22:47] doc |
admin:indexing:creation:declaring [2016/06/28 22:38] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ~~NOTOC~~ | ||
- | {{page>:top_add&nofooter&noeditbtn}} | ||
- | ====== Administration: Omnidex Indexing ====== | ||
- | |||
- | ===== Indexing Creation ===== | ||
- | |||
- | [[admin:indexing:creation:home|Overview]] | | ||
- | **[[admin:indexing:creation:declaring|Declaring Indexes]]** | | ||
- | [[admin:indexing:creation:updating|Updating Indexes]] | | ||
- | [[admin:indexing:creation:standalone|Standalone Indexes]] | | ||
- | [[admin:indexing:creation:files|Index Files]] | | ||
- | [[admin:indexing:creation:updating|Maintenance]] | ||
- | |||
- | ==== Declaring Indexes ==== | ||
- | |||
- | The easiest way to add Omnidex Indexing is to add indexing information beside each column. This will not work in all situations, such as when multi-column indexes are being created; however, it will work in many simpler installations. More complex installations will require the more complex features described in [[dev:sql:statements:create_table:home|CREATE TABLE]] and [[dev:sql:statements:create_index:home|CREATE INDEX]]. The example below shows the basic addition of Omnidex indexing to the same database. | ||
- | |||
- | <code sql> | ||
- | > create environment | ||
- | >> in "simple.xml" | ||
- | >> with delete; | ||
- | Environment created in simple.xml | ||
- | > | ||
- | > | ||
- | > create database "SIMPLE" | ||
- | >> type FILE | ||
- | >> index_directory "idx" | ||
- | >> in "simple.xml"; | ||
- | Database SIMPLE created in simple.xml | ||
- | > | ||
- | > | ||
- | > create table "HOUSEHOLDS" | ||
- | >> physical "dat/households.dat" | ||
- | >> ( | ||
- | >> "HOUSEHOLD" CHARACTER(12) omnidex, | ||
- | >> "ADDRESS" CHARACTER(50) quicktext, | ||
- | >> "CITY" CHARACTER(28) quicktext, | ||
- | >> "STATE" CHARACTER(2) omnidex, | ||
- | >> "ZIP" CHARACTER(5) omnidex, | ||
- | >> "COUNTRY" CHARACTER(2) omnidex, | ||
- | >> constraint HOUSEHOLDS_HOUSEHOLD_PK primary ("HOUSEHOLD") | ||
- | >> ) | ||
- | >> in "simple.xml"; | ||
- | Table HOUSEHOLDS created in simple.xml | ||
- | > | ||
- | > | ||
- | > create table "INDIVIDUALS" | ||
- | >> physical "dat/individuals.dat" | ||
- | >> ( | ||
- | >> "INDIVIDUAL" CHARACTER(12) omnidex, | ||
- | >> "HOUSEHOLD" CHARACTER(12) omnidex, | ||
- | >> "NAME" CHARACTER(50) quicktext, | ||
- | >> "GENDER" CHARACTER(1) omnidex bitmap, | ||
- | >> "BIRTHDATE" ANSI DATE omnidex, | ||
- | >> "PHONE" CHARACTER(14) omnidex, | ||
- | >> "EMAIL" CHARACTER(60) quicktext, | ||
- | >> constraint INDIVIDUALS_INDIVIDUAL_PK primary ("INDIVIDUAL"), | ||
- | >> constraint INDIVIDUALS_HOUSEHOLD_FK foreign ("HOUSEHOLD") references "HOUSEHOLDS" | ||
- | >> ) | ||
- | >> in "simple.xml"; | ||
- | Table INDIVIDUALS created in simple.xml | ||
- | </code> | ||
- | |||
- | |||
- | ==== ==== | ||
- | |||
- | **[[admin:indexing:creation:home|Prev]] | [[admin:indexing:creation:updating|Next]]** | ||
- | |||
- | |||
- | ====== Additional Resources ====== | ||
- | |||
- | See also: | ||
- | |||
- | {{page>:admin:indexing:see_also&nofooter&noeditbtn}} | ||
- | |||
- | {{page>:bottom_add&nofooter&noeditbtn}} |