Differences

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

Link to this comparison view

Next revision
Previous revision
admin:basics:rawdata:fixed [2011/02/28 21:34]
els created
— (current)
Line 1: Line 1:
-~~NOTOC~~ 
  
-{{page>:​top_add&​nofooter&​noeditbtn}} 
- 
-====== Administration:​ Omnidex Fundamentals ====== 
- 
-===== Raw Data Files ===== 
- 
-[[admin:​basics:​rawdata:​home|Overview]] | 
-**[[admin:​basics:​rawdata:​fixed|Fixed-length Files]]** | 
-[[admin:​basics:​rawdata:​delimited|Fixed-length Files]] | 
-[[admin:​basics:​rawdata:​layout|Record Layouts]] | 
-[[admin:​basics:​rawdata:​constraints|Table Constraints]] 
- 
----- 
-==== Fixed-Length Types ==== 
- 
-In general, the data files that Omnidex indexes must maintain a consistent structure, meaning that the data has consistent rows and columns. ​ For example, relational database systems allow data to be exported data into data files, and these files are ideal for indexing with Omnidex. ​ Similarly, companies often receive data from vendors or suppliers in this same form, and these files can be indexed directly without having to load the data into a relational database.  ​ 
- 
-=== Fixed-length vs. Delimited Files === 
- 
-Data files usually fall into one of two categories: 
- 
-  * **Fixed-length Files** - Fixed length files will always use the same number of bytes for each column and each row, regardless of the content of the data.  No delimiters are used, and instead each column and each row can be located based on its offset within the file.  Fixed-length files can contain both character and binary data, and are extremely fast to read.    
- 
-  * **Delimited Files** - Delimited files separate the content of columns and rows using special delimiter characters. ​ Tabs and commas are common delimiters between columns, and linefeeds are common delimiters between rows.  Delimited files always store data in character format, though they can correlate to binary datatypes in a table definition. ​ Delimited files are somewhat slower to process due to the parsing of the delimiters, but are exceptionally portable and common. ​ Delimited files are discussed in detail in [[admin:​basics:​rawdata:​delimited|this section]]. 
- 
-Companies also have data that is not maintained with a consistent structure, such as word processing documents, spreadsheets,​ PDF files, HTML files and XML files. ​ At present, Omnidex does not index these types of files directly, though there are techniques for indexing their textual content that are discussed in the documentation for [[admin:​indexing:​text:​home|Omnidex Text]].  ​ 
- 
-=== Declaring a Raw Data File === 
- 
-Raw data files are accessed by creating a table definition in Omnidex that points to the data file.  Once this is done, applications can use SQL statements to access the table. ​ Omnidex will process the data in the data file just like it would when accessing a relational database. 
- 
-In the [[dev:​sql:​statements:​create_table:​home|CREATE TABLE]] statement, the PHYSICAL clause is used to point to the physical location of the raw data file.  This PHYSICAL clause can contain a relative path name (relative to the location of the Omnidex Environment File) such as "​dat/​states.dat",​ or an absolute path name such as "​d:/​class/​lab1/​dat/​states.dat"​. ​ This PHYSICAL clause can also contain [[admin:​basics:​rawdata:​filesets|multiple filesets]], and can reference [[appendix:​reference:​envvar|environment variables]]. 
- 
-<code sql> 
-create table          "​STATES"​ 
- ​physical ​            "​dat/​states.dat"​ 
- ... 
-</​code>​ 
- 
-=== Declaring Filesets === 
- 
-In the example above, a single file was used as the source of data for a table. ​ It is also possible for multiple files to be used as the source of data for a table. ​ As long as the files all share the same record layout, they will all be processed when reading the table. 
- 
-Filesets can be declared as a comma-separated list of files, or they can be declared using wildcards in the filename. ​ In this example, three files are declared individually in the PHYSICAL clause: 
- 
-<code sql> 
-create table          "​STATES"​ 
- ​physical ​            "​dat/​states1.dat,​ dat/​states2.dat,​ dat/​states3.dat"​ 
- ... 
-</​code>​ 
- 
-In this second example, wildcards are used to declare these files: 
- 
-<code sql> 
-create table          "​STATES"​ 
- ​physical ​            "​dat/​states*.dat"​ 
- ... 
-</​code>​ 
- 
-Wildcards provide a great flexibility since it allows more data to be added to a table by simply moving another file into place. ​ Care should be taken with this approach, though, since the table must be reindexed as soon as new data is in place. 
- 
-=====  ===== 
- 
-**[[admin:​basics:​rawdata:​home|Prev]]** | 
-**[[admin:​basics:​rawdata:​record|Next]]** 
- 
-====== Additional Resources ====== 
- 
-See also:  
- 
-{{page>:​admin:​basics:​see_also&​nofooter&​noeditbtn}} 
- 
-{{page>:​bottom_add&​nofooter&​noeditbtn}} 
 
Back to top
admin/basics/rawdata/fixed.1298928879.txt.gz ยท Last modified: 2012/10/26 14:51 (external edit)