Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
integration:rdbms:mysql:example [2011/04/05 02:53]
127.0.0.1 external edit
integration:rdbms:mysql:example [2016/06/28 22:38] (current)
Line 21: Line 21:
 ==== Example ==== ==== Example ====
  
-The following example is a simple database using an MySQL database. ​ The Omnidex Environment File is displayed below; however, the entire ​examplecan ​be downloaded as a ZIP file at the following link:  **{{:​integration:​rdbms:​mysql:​mysql_example.zip|Download ZIP File}}**. ​ This ZIP file also includes files that can be used to create the MySQL database.+The following example is a simple database using MySQL database. ​ The Omnidex Environment File is displayed below; however, the entire ​example can be downloaded as a ZIP file at the following link:  **{{:​integration:​rdbms:​mysql:​mysql_example.zip|Download ZIP File}}**. ​ This ZIP file also includes files that can be used to create the MySQL database.
  
-The following statements will create and build an Omnidex Environment against ​an MySQL database:+The following statements will create and build an Omnidex Environment against ​MySQL database:
 <​code>​ <​code>​
 > use sql/​create_all.sql > use sql/​create_all.sql
Line 33: Line 33:
 -> ; -> ;
 -> create database ​               "​SIMPLE"​ -> create database ​               "​SIMPLE"​
->> ​ type                          mysql +>> ​ type                          ​odbc 
->>  ​version ​                      "11"+>> ​ subtype ​                      mysql 
 +>>  ​filedsn ​                      "dat/​simple.dsn"
 >> ​ user                          "​simple"​ >> ​ user                          "​simple"​
 >> ​ password ​                     "​simple"​ >> ​ password ​                     "​simple"​
Line 95: Line 96:
 >> ​  ​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 109: Line 109:
 >> ​  "​NAME" ​             CHARACTER(50) ​    ​quicktext,​ >> ​  "​NAME" ​             CHARACTER(50) ​    ​quicktext,​
 >> ​  "​GENDER" ​           CHARACTER(1) ​     omnidex bitmap, >> ​  "​GENDER" ​           CHARACTER(1) ​     omnidex bitmap,
->> ​  "​BIRTHDATE" ​        MYSQL DATETIME ​  ​omnidex,+>> ​  "​BIRTHDATE" ​        ODBC DATETIME ​    ​omnidex,
 >> ​  "​PHONE" ​            ​CHARACTER(14) ​    ​omnidex,​ >> ​  "​PHONE" ​            ​CHARACTER(14) ​    ​omnidex,​
 >> ​  "​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"​)
Line 122: Line 121:
 -> ; -> ;
 -> connect simple.xml -> connect simple.xml
-Connected to D:\class\lab2c\simple.xml+Connected to D:\class\lab_mys\simple.xml
 -> ->
 -> ; Update the Omnidex indexes -> ; Update the Omnidex indexes
 -> update indexes; -> update indexes;
-Updated indexes for COUNTRIES (239 rows, 0.016 cpu, 0.500 elapsed) +Updated indexes for COUNTRIES (239 rows, 0.016 cpu, 0.235 elapsed) 
-Updated indexes for STATES (76 rows, 0.016 cpu, 0.047 elapsed) +Updated indexes for STATES (76 rows, 0.000 cpu, 0.031 elapsed) 
-Updated indexes for GENDERS (2 rows, 0.016 cpu, 0.031 elapsed) +Updated indexes for GENDERS (2 rows, 0.000 cpu, 0.031 elapsed) 
-Updated indexes for HOUSEHOLDS (1,909 rows, 0.031 cpu, 0.110 elapsed) +Updated indexes for HOUSEHOLDS (1,909 rows, 0.016 cpu, 0.094 elapsed) 
-Updated indexes for INDIVIDUALS (5,000 rows, 0.031 cpu, 0.578 elapsed)+Updated indexes for INDIVIDUALS (5,000 rows, 0.016 cpu, 0.766 elapsed)
 Omnidex indexes updated for environment USER_ENVIRONMENT Omnidex indexes updated for environment USER_ENVIRONMENT
 -> ; -> ;
 -> ; Update statistics to improve performance optimization;​ -> ; Update statistics to improve performance optimization;​
 -> update statistics; -> update statistics;
-Updated statistics for COUNTRIES (239 rows, 0.156 cpu, 0.203 elapsed) +Updated statistics for COUNTRIES (239 rows, 0.047 cpu, 0.062 elapsed) 
-Updated statistics for STATES (76 rows, 0.016 cpu, 0.015 elapsed) +Updated statistics for STATES (76 rows, 0.016 cpu, 0.031 elapsed) 
-Updated statistics for GENDERS (2 rows, 0.016 cpu, 0.015 elapsed) +Updated statistics for GENDERS (2 rows, 0.016 cpu, 0.016 elapsed) 
-Updated statistics for HOUSEHOLDS (1,909 rows, 0.047 cpu, 0.047 elapsed) +Updated statistics for HOUSEHOLDS (1,909 rows, 0.063 cpu, 0.047 elapsed) 
-Updated statistics for INDIVIDUALS (5,000 rows, 0.078 cpu, 0.078 elapsed)+Updated statistics for INDIVIDUALS (5,000 rows, 0.109 cpu, 0.110 elapsed)
 Statistics updated for environment USER_ENVIRONMENT Statistics updated for environment USER_ENVIRONMENT
 -> ; -> ;
 -> ; Update the text database to enable PowerSearch;​ -> ; Update the text database to enable PowerSearch;​
 -> update text; -> update text;
-Updated text for COUNTRIES (0.000 cpu, 0.015 elapsed)+Updated text for COUNTRIES (0.016 cpu, 0.031 elapsed)
 Updated text for STATES (0.000 cpu, 0.000 elapsed) Updated text for STATES (0.000 cpu, 0.000 elapsed)
-Updated text for GENDERS (0.000 cpu, 0.000 elapsed) +Updated text for GENDERS (0.000 cpu, 0.016 elapsed) 
-Updated text for HOUSEHOLDS (0.063 cpu, 0.078 elapsed) +Updated text for HOUSEHOLDS (0.016 cpu, 0.015 elapsed) 
-Updated text for INDIVIDUALS (0.063 cpu, 0.062 elapsed)+Updated text for INDIVIDUALS (0.016 cpu, 0.016 elapsed)
 Text metadata updated for environment USER_ENVIRONMENT Text metadata updated for environment USER_ENVIRONMENT
 -> ; -> ;
 -> disconnect -> disconnect
 Disconnected Disconnected
-</​code>​+></​code>​
  
 =====  ===== =====  =====
 
Back to top
integration/rdbms/mysql/example.1301971997.txt.gz · Last modified: 2016/06/28 22:38 (external edit)