Differences

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

Link to this comparison view

Next revision
Previous revision
integration:rdbms:mysql:environments [2011/04/05 02:52]
127.0.0.1 external edit
integration:rdbms:mysql:environments [2016/06/28 22:38] (current)
Line 23: Line 23:
 The Omnidex Environment File contains metadata that describes the MySQL database and the Omnidex configuration. ​ This includes the following connection and schema information:​ The Omnidex Environment File contains metadata that describes the MySQL database and the Omnidex configuration. ​ This includes the following connection and schema information:​
  
-  * MySQL major version number (eg. 1011etc) +  * MySQL systemuseror file datasource
-  * SQL*Net service information+
   * MySQL user and password ​   * MySQL user and password ​
-  * MySQL schema information tables, columns and datatypes+  * MySQL schema information tables, columnsand datatypes
   * MySQL primary and foreign key constraints   * MySQL primary and foreign key constraints
   * MySQL native indexes   * MySQL native indexes
  
-=== Generating an Omnidex Environment File ===+=== Automatically ​Generating an Omnidex Environment File ===
  
-Omnidex can automatically generate the CREATE ENVIRONMENT,​ CREATE DATABASE, CREATE TABLE and CREATE INDEX statements needed for an Omnidex Environment File.  The [[dev:​sql:​statements:​extract|EXTRACT]] statement is used to connect to the MySQL database, query the underlying schema information,​ and generate the appropriate statements. ​ This statement can be issued through OdxSQL, or through any ODBC or JDBC application.+Omnidex can automatically generate the CREATE ENVIRONMENT,​ CREATE DATABASE, CREATE TABLEand CREATE INDEX statements needed for an Omnidex Environment File.  The [[dev:​sql:​statements:​extract:home|EXTRACT]] statement is used to connect to the MySQL database, query the underlying schema information,​ and generate the appropriate statements. ​ This statement can be issued through OdxSQL, or through any ODBC or JDBC application.
  
 <​code>​ <​code>​
Line 38: Line 37:
   for         MYSQL   for         MYSQL
   to          "​simple.sql"​   to          "​simple.sql"​
-  with        USER="​simple"​+  with        ​DSN="​simple"​ 
 +              ​USER="​simple"​
               PASSWORD="​simple"​               PASSWORD="​simple"​
               DATABASE="​simple"​               DATABASE="​simple"​
Line 45: Line 45:
 \\ \\
 The following options from the [[dev:​sql:​statements:​extract:​home|EXTRACT]] SQL statement are used to provide MySQL connection information and control the output of the statement. ​ These options also correlate with the options of the [[dev:​sql:​statements:​create_database:​home|CREATE DATABASE]] statement. The following options from the [[dev:​sql:​statements:​extract:​home|EXTRACT]] SQL statement are used to provide MySQL connection information and control the output of the statement. ​ These options also correlate with the options of the [[dev:​sql:​statements:​create_database:​home|CREATE DATABASE]] statement.
 +
 +== DSN or FILEDSN ==
 +
 +The DSN option references a system or user datasource for the database, and the FILEDSN option references a file datasource for the database. ​ These datasources are created within MySQL to access the native MySQL database.
  
 == USER == == USER ==
  
-The user to be used when accessing MySQL. ​ One user and password is used when connecting to the MySQL database. ​ That login determines ​that security access to the database and the visibility of the underlying database objects. ​ This option is required.+The user to be used when accessing MySQL. ​ One user and password is used when connecting to the MySQL database. ​ That login determines ​the security access to the database and the visibility of the underlying database objects. ​ This option is required ​unless a user and password are included in the datasource.
  
 == PASSWORD == == PASSWORD ==
  
-The password to be used when accessing MySQL. ​ This password must correspond to the user referenced in the USER option. ​ This option is required.+The password to be used when accessing MySQL. ​ This password must correspond to the user referenced in the USER option. ​ This option is required ​unless a user and password are included in the datasource, or unless the user does not require a password.
  
 == DATABASE == == DATABASE ==
  
-The DATABASE option controls the logical database name to be recorded in the Omnidex Environment File for this database. ​ This is not an MySQL setting, but rather a logical name given to the database for use in Omnidex statements. ​ This option is required.+The DATABASE option controls the logical database name to be recorded in the Omnidex Environment File for this database. ​ This is not MySQL setting, but rather a logical name given to the database for use in Omnidex statements. ​ This option is required.
  
 == TABLES == == TABLES ==
  
-The TABLES option controls the table schema information to be extracted from MySQL. ​ The TABLES option can include a comma-separated list of tables, "​USER.*"​ to extract all tables for a named user, or "​*"​ to extract all tables. ​ If this option is omitted, then all available tables are extracted.+The TABLES option controls the table schema information to be extracted from MySQL. ​ The TABLES option can include a comma-separated list of tables or "​*"​ to extract all tables. ​ If this option is omitted, then all available tables are extracted.
  
 == INDEX_DIRECTORY == == INDEX_DIRECTORY ==
  
-The INDEX_DIRECTORY option declares the directory to contain the Omnidex indexes. ​ This is not an MySQL setting, but rather path designation where indexes should be built. ​ This directory can include either absolute or relative path designations. ​ If this option is omitted, then the indexes will be built in the same directory as the Omnidex Environment File.+The INDEX_DIRECTORY option declares the directory to contain the Omnidex indexes. ​ This is not MySQL setting, but rather ​path designation where indexes should be built. ​ This directory can include either absolute or relative path designations. ​ If this option is omitted, then the indexes will be built in the same directory as the Omnidex Environment File.
  
 === Limitations of the Omnidex EXTRACT statement === === Limitations of the Omnidex EXTRACT statement ===
Line 71: Line 75:
  
   * MySQL object names, such as tables, columns, constraints or indexes, are reduced to 32 bytes in length for use in Omnidex.   * MySQL object names, such as tables, columns, constraints or indexes, are reduced to 32 bytes in length for use in Omnidex.
-  * Most MySQL binary data is stored in NUMBER datatypes. If the NUMBER datatype is accompanied by scale and precision information,​ Omnidex can guess at an appropriate matching binary datatype, such as BIGINT, INTEGER, SMALLINT, TINYINT, FLOAT or DOUBLE. If scale and    precision are not specified, Omnidex will necessarily use a DOUBLE datatype. For the best performance and ease of development,​ these datatypes should be changed to the smallest binary datatype that will accommodate the values in the column. +  * MySQL Wide Character datatypes, which are commonly used to store Unicode data, are shown as CHARACTER or STRING datatype, as these are the most universal datatypes in an Omnidex application. If necessary, these can be changed to Omnidex NCHARACTER or NSTRING datatypes. 
-  * MySQL National ​Character datatypes, which are commonly used to store Unicode data, are shown as CHARACTER or STRING datatype, as these are the most universal datatypes in an Omnidex application. If necessary, these can be changed to Omnidex NCHARACTER or NSTRING datatypes. + 
-  ​* Depending on the configuration of the MySQL databasesome constraint information may not be available and must be added manually.+=== Manually Creating an Omnidex Environment File === 
 + 
 +An Omnidex Environment File can also be created by manually issuing CREATE ENVIRONMENT,​ CREATE DATABASE, CREATE TABLE, and CREATE INDEX statements in OdxSQL or using ODBC or JDBC.  If these statements are written to a text batch filethen that file can be submitted to OdxSQL using the USE command. 
 + 
  
 =====  ===== =====  =====
 
Back to top
integration/rdbms/mysql/environments.1301971963.txt.gz · Last modified: 2016/06/28 22:38 (external edit)