Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorials:simple_flatfile [2009/12/05 18:34]
tdo
tutorials:simple_flatfile [2012/10/26 14:46] (current)
Line 2: Line 2:
 <​html><​div align="​center"><​span style="​color:​red">​DRAFT</​span></​div></​html>​ <​html><​div align="​center"><​span style="​color:​red">​DRAFT</​span></​div></​html>​
 ====== Simple Flat File ====== ====== Simple Flat File ======
-==== Step 1 - Creating the Omnidex Environment Source ====+==== Step 1 - Creating the Omnidex Environment Source ​DDL ==== 
 + 
 +Omnidex uses the SQL Standard Data Definition Statement (DDL) for defining the Omnidex metadata used to connect to a data store.
  
 The following sample Environment Catalog Source is the minimum set of statements that will compile into an Omnidex Compiled Environment. The following sample Environment Catalog Source is the minimum set of statements that will compile into an Omnidex Compiled Environment.
  
 <​code>​ <​code>​
-ENVIRONMENT ​tinyenv +CREATE ​ENVIRONMENT ​in "​first.xml"​ 
-DATABASE tinydb + 
-  TYPE flatfile +CREATE ​DATABASE tinydb 
-TABLE table1 +  TYPE flatfile  
-  ​COLUMN ​myseq DATATYPE INTEGER +  in "​first.xml"​ 
-  ​COLUMN ​mytext DATATYPE CHAR(60)+ 
 +CREATE ​TABLE table1 
 +  ​(myseq DATATYPE INTEGER ​omnidex, 
 +   ​mytext DATATYPE CHAR(60) ​quicktext) 
 +  in "​first.xml"​
 </​code>​ </​code>​
  
-Use Notepad or any other text editor to create the Omnidex Environment source file.  You can also select, cut and paste the text from this documentation to create the file.+Although these DDL statements can be entered directly in OdxSQL, they are typically created in an editor. So use Notepad or any other text editor to create the Omnidex Environment ​DDL source file.  You can also select, cut and paste the text from this documentation to create the file.
  
-This creates an Omnidex Environment named "tinyenv" with a single Database named "​tinydb"​ with one table named "​table1"​. ​ Because the DATABASE TYPE is "​flatfile",​ the name of the underlying operating system file for this table is "​table1"​. ​ Typically a filespec location would be used.  Copy and save this environment as "tiny.src".+This creates an Omnidex Environment named "first.xml" with a single Database named "​tinydb"​ with one table named "​table1"​. ​ Because the DATABASE TYPE is "​flatfile",​ the name of the underlying operating system file for this table is "​table1"​. ​ Typically a filespec location would be used.  Copy and save this environment as "first.src".
  
-==== Step 2 - Compiling ​the Omnidex Environment ====+==== Step 2 - Compile ​the Omnidex Environment ​source into XML Environment Catalog ​==== 
 + 
 +  os> odxsql  
 +  odxsql> use first.sql 
 +  odxsql> exit
  
-  os> oacomp tiny.src tiny.env 
 ==== Step 3 - Use OdxSQL to test, verify and manipulate the Environment ==== ==== Step 3 - Use OdxSQL to test, verify and manipulate the Environment ====
  
-  os> odxsql tiny.env+OdxSQL accepts a command line argument to specify the Omnidex Environment.
  
-or+  os> odxsql first.xml 
 + 
 +Alternatively,​ OdxSQL can be run and then a CONNECT command can be issued.
  
   os> odxsql   os> odxsql
-  > connect ​tiny.env+  > connect ​first.xml
  
   > create file table1   > create file table1
Line 35: Line 46:
 OdxSQL contains several commands that facilitate with working with the underlying operating system without leaving OdxSQL. OdxSQL contains several commands that facilitate with working with the underlying operating system without leaving OdxSQL.
  
-  > insert into table1 values (1)+  > insert into table1 values (1, 'my text')
  
 Standard SQL INSERT statements are supported. Standard SQL INSERT statements are supported.
Line 43: Line 54:
 <​code>​ <​code>​
  
-C:​\dev\odx\tiny>​more tiny.src 
-ENVIRONMENT tinyenv 
-DATABASE tinydb 
-  TYPE flatfile 
-TABLE table1 
-  COLUMN mysq DATATYPE INTEGER 
-  COLUMN mytext DATATYPE CHAR(60) 
  
-C:​\dev\odx\tiny>​oacomp tiny.src tiny.env +C:​\dev\odx\tiny>​odxsql ​first.xml
-OACOMP - Omnidex Environment Compiler ​                 Mon Nov 30 21:41:50 2009 +
-(c) Dynamic Information Systems Corp.  1981-2009 ​                  5.0 Build 1H +
-Microsoft Windows XP Professional SP 3 (2600) ​                       TDO830/​TDO +
-** Trial Copy ** +
- +
-Parsed; Validated; Compiled; Done +
-** Environment Compiled Successfully! ** +
- +
- +
-C:​\dev\odx\tiny>​odxsql ​tiny.env+
 ODXSQL - Omnidex SQL                                   Mon Nov 30 21:41:59 2009 ODXSQL - Omnidex SQL                                   Mon Nov 30 21:41:59 2009
 (c) Dynamic Information Systems Corp.  1981-2009 ​                  5.0 Build 1H (c) Dynamic Information Systems Corp.  1981-2009 ​                  5.0 Build 1H
Line 91: Line 85:
 > >
 </​code>​ </​code>​
-==== Step 4 - Install and Build Indexes with DBINSTAL ====+==== Step 4 - Build Indexes with DBINSTAL ====
  
 <​code>​ <​code>​
-C:​\dev\odx\tiny>dbinstal +  osodxsql first    
-DBINSTAL - Omnidex Database Indexing Utility ​          Tue Dec 01 07:30:37 2009 +  ​odxsql> update indexes 
-(c) Dynamic Information Systems Corp.  1981-2009 ​                  5.0 Build 1H +</code>
-Microsoft Windows XP Professional SP 3 (2600) ​                       TDO830/TDO +
-** Trial Copy **+
  
-Database or Environment:​ tiny.env 
- 
-Cmd: install 
- 
-** OMNIDEX MultiDimensional/​Keyword (MDK) Index Installation ** 
- 
-Enter Tables and Columns to be indexed 
- 
-To create an index comprised of all or parts of one or more columns, 
-enter an Index Name followed by '​!'​ at the Column prompt 
- 
-Enter '?'​ for a list of Tables or Columns, '/'​ to exit the current prompt 
- 
-Table name? table1 
- 
-To index this table in any parent domains, enter the 
-column linking it to its parent or '​P='​ followed by the parent name 
- 
-Link column 1: / 
-Table will be indexed in its own domain 
-Column name: mytext;kw 
-Column name: / 
-Table name? / 
- 
-Specification of MDK indexes is complete 
- 
-** OMNIDEX Aggregation/​Sorted_Key (ASK) Index Installation ** 
- 
-Table name? / 
- 
-Proceed with installation?​ [Y] 
- 
-Use the Build command to load the following indexes: 
- 
-TABLE1 (Omnidex MDK) 
- 
-Cmd: build 
-Table [;key] table1 
-Unloading keywords 
-TABLE1: 3 records (15 keywords) processed 
-15 keywords unloaded 
-0 (0MB), 1 (1MB), 0 (0MB) 
-Loading keywords 
- 
-15 keywords loaded 
-2 blocks used, 2 levels 
-Indexing complete. ​ CPU time: 0:​00:​00 ​ Elapsed: 0:00:00 
- 
-Cmd: quit 
- 
-C:​\dev\odx\tiny>​ 
-</​code>​ 
 ==== Step 5 - Develop an Application with ODBC, JDBC or Stored Procedures ==== ==== Step 5 - Develop an Application with ODBC, JDBC or Stored Procedures ====
  
Line 158: Line 98:
 Create an ODBC or JDBC datasource using the Windows Client DataSource Editor (DSEDIT). Create an ODBC or JDBC datasource using the Windows Client DataSource Editor (DSEDIT).
  
-Name the file as "tiny.dsn".+Name the file as "first.dsn".
  
 Or modify the following text file and save as tiny.dsn. Or modify the following text file and save as tiny.dsn.
Line 172: Line 112:
 <​code>​ <​code>​
 Host=tdo830 Host=tdo830
-ODBCDSNFILE=C:​\dev\odx\tiny\tiny.dsn +ODBCDSNFILE=C:​\dev\odx\first.dsn 
-FileSpec=c:​\dev\odx\tiny\tiny.env+FileSpec=c:​\dev\odx\first.xml
 </​code>​ </​code>​
  
Line 179: Line 119:
 ODBC] ODBC]
 DRIVER=DISC OMNIDEX OdxNet Driver DRIVER=DISC OMNIDEX OdxNet Driver
-ODBCDSNFILE=C:​\dev\odx\tiny\tiny.dsn +ODBCDSNFILE=C:​\dev\odx\first.dsn 
-ODBCDSNNAME=tinydsn+ODBCDSNNAME=firstdsn
 [DataSources] [DataSources]
 tinydsn=DataSource Edit Wizard Generated tinydsn=DataSource Edit Wizard Generated
-[DataSource ​tinydsn+[DataSource ​firstdsn
-Dictionary=tinydsn+Dictionary=firstdsn
 DisplayWindow=NONE DisplayWindow=NONE
 [Dictionaries] [Dictionaries]
 tinydsn=DataSource Edit Wizard Generated tinydsn=DataSource Edit Wizard Generated
-[Dictionary ​tinydsn]+[Dictionary ​firstdsn]
 Server=Server1 Server=Server1
 NetworkServices=OdxNet NetworkServices=OdxNet
 Type=OmniAccess Type=OmniAccess
-FileSpec=c:​\dev\odx\tiny\tiny.env+FileSpec=c:​\dev\odx\first.env
 HostOAConnectOptions= HostOAConnectOptions=
 Password=!~ Password=!~
Line 210: Line 150:
 Go back to the original command window and do the following: Go back to the original command window and do the following:
  
-   ​os>​ odxsql ​tiny.dsn -odbc+   ​os>​ odxsql ​first.dsn -odbc
  
 or run an ODXNET listener from within OdexSQL using the -odxnet command line option. or run an ODXNET listener from within OdexSQL using the -odxnet command line option.
  
    ​os>​ odxsql -odxnet    ​os>​ odxsql -odxnet
-   > connect ​tiny.dsn using odbc+   > connect ​first.dsn using odbc
               ​               ​
 <​code>​ <​code>​
 
Back to top
tutorials/simple_flatfile.1260038065.txt.gz · Last modified: 2012/10/26 14:42 (external edit)