A PCRE internal error occured. This might be caused by a faulty plugin

* [[topbar |Table of Contents]] * [[intro:overview:what|Introduction]] * [[install:home|Installation]] * [[install:editions|Product Editions]] * [[install:requirements|System Requirements]] * [[install:platforms|Supported Platforms]] * [[install:guides:home|Installation Guides]] * [[install:licensing:home|Licensing]] * [[install:releases:home|Release Notes]] * [[admin:home|Administration]] * [[admin:admin:home|Administration Basics]] * [[admin:admin:architecture:home|Omnidex Architecture]] * [[admin:admin:applications:home|Building Applications]] * [[admin:basics:home|Omnidex Fundamentals]] * [[admin:basics:environments:home|Omnidex Environments]] * [[admin:basics:sqlengine:home|Omnidex SQL Engine]] * [[admin:basics:updates:home|Omnidex Updates]] * [[admin:basics:network:home|Network Services]] * [[admin:indexing:home|Omnidex Indexing]] * [[admin:indexing:concepts:home|Indexing Concepts]] * [[admin:indexing:indexes:home|Indexing Options]] * [[admin:indexing:creation:home|Index Creation]] * [[admin:indexing:strategies:home|Indexing Strategies]] * [[admin:indexing:activecounts:home|ActiveCounts]] * [[admin:indexing:powersearch:home|PowerSearch]] * [[admin:indexing:autocomplete:home|AutoComplete]] * [[admin:indexing:text:home|Omnidex Text]] * [[admin:features:home|Omnidex Features]] * [[admin:features:snapshots:home|Omnidex Snapshots]] * [[admin:features:grids:home|Omnidex Grids]] * [[admin:features:rollups:home|Rollup Tables]] * [[admin:features:geo:home|Geographic Searches]] * [[admin:features:expressioncols:home|Expression Columns]] * [[admin:features:segments:home|Omnidex Segments]] * [[admin:features:attach:home|Attaching Data]] * [[admin:features:export:home|Exporting Data]] * [[admin:optimization:home|Optimizing Queries]] * [[admin:optimization:plans:home|Query Plans]] * [[admin:optimization:caches:home|Dynamic Caches]] * [[admin:optimization:config:home|Configuring Omnidex]] * [[integration:home|Integration]] * [[integration:rdbms:home|Relational Databases]] * [[integration:rdbms:oracle:home|Oracle]] * [[integration:rdbms:sqlserver:home|SQL Server]] * [[integration:rdbms:mysql:home|MySQL]] * [[integration:rdbms:odbc:home|Generic ODBC]] * [[integration:rawdata:home|Raw Data Files]] * [[integration:rawdata:fixed:home|Fixed-length Files]] * [[integration:rawdata:delimited:home|Delimited Files]] * [[integration:rawdata:ost:home|Standalone Tables]] * [[dev:home|Development]] * [[dev:sql:home|Omnidex SQL]] * [[dev:sql:overview|Overview]] * [[dev:sql:statements:home|Statements]] * [[dev:sql:functions:home|Functions]] * [[dev:sql:examples:home|Examples]] * [[dev:connections:home|Connection Strings]] * [[dev:odbc:home|ODBC Interface]] * [[dev:jdbc:home|JDBC Interface]] * [[dev:debugging:home|Logging/Debugging]] * [[programs:home|Programs]] * [[programs:odxsql:home|OdxSQL]] * [[programs:odxnet:home|OdxNet]] * [[appendix:home|Appendix]] * [[dev:sql:home|Omnidex SQL]] * [[dev:sql:statements:home|Statements]] * [[dev:sql:functions:home|Functions]] * [[dev:sql:examples:home|Examples]] * [[http://www.omnidex.com/download/|Downloads]] * [[support:home|Support]]

~~NOTOC~~ {{page>:top_add&nofooter&noeditbtn}} ====== Integration: Relational Databases ====== ===== Oracle ===== [[integration:rdbms:oracle:home|Overview]] | [[integration:rdbms:oracle:environments|Environments]] | [[integration:rdbms:oracle:databases|Databases]] | **[[integration:rdbms:oracle:tables|Tables]]** | [[integration:rdbms:oracle:constraints|Constraints]] | [[integration:rdbms:oracle:datatypes|Datatypes]] | [[integration:rdbms:oracle:queries|Queries]] | [[integration:rdbms:oracle:updates|Updates]] | [[integration:rdbms:oracle:example|Example]] ---- ==== Tables ==== === The CREATE TABLE Statement === The [[dev:sql:statements:create_table:home|CREATE TABLE]] statement is used to declare an Oracle table or view within an Omnidex Environment File. The Omnidex Environment File will contain a declaration for each Oracle table or view to be accessed, and will correlate all of the schema information between Omnidex and Oracle, including object names and datatypes. This statement can either be issued directly, or it can be extracted from Oracle using the EXTRACT statement as discussed in the previous section. The following example compares the Oracle declarations with the Omnidex declarations. **Oracle CREATE TABLE Statement** <code> create table STATES (STATE_CD CHAR(2), DESCRIPTION VARCHAR2(31), STATE_NUM CHAR(2), REGION_CD CHAR(2), COUNTRY_CD CHAR(2), TAX_RATE NUMBER(16,6)); </code> **Omnidex CREATE TABLE Statement** <code> create table "STATES" physical "SIMPLE.STATES" ( "STATE" CHARACTER(2) physical "STATE_CD", "DESCRIPTION" STRING(31), "STATE_CODE" CHARACTER(2) physical "STATE_NUM", "REGION" CHARACTER(2) physical "REGION_CD", "COUNTRY" CHARACTER(2) physical "COUNTRY_CD", "TAX_RATE" FLOAT ) in "simple.xml"; </code> === Using the Table and Column PHYSICAL Clauses === In the Omnidex declaration, note that the optional PHYSICAL clause for the table allows Omnidex to have a different table name than Oracle. This is most commonly used to allow a //user.table// designation for the Oracle table, but can also be used when administrators wish a different name in the Omnidex environment or need to shorten a table name to meet the 32-character limit in Omnidex. If the PHYSICAL clause is not present, Omnidex assumes that the table names are the same between Omnidex and Oracle. Column declarations can similarly use a PHYSICAL clause to allow Omnidex to have a different column name than Oracle. === Modifying Omnidex's View of the Oracle Data Objects === When Omnidex accesses a table, it only knows about the data objects that are declared in the Omnidex Environment File. It does not have an independent understanding of the Oracle environment. This allows administrators to shape the Omnidex Environment the way they want. Some of the opportunities this provides are: * Omnidex can have a controlled view of the Oracle database, limited to only the tables that the application requires. Similarly, administrators can choose to include only the columns for each table that the application requires. * Omnidex tables can point to Oracle views, allowing an easy approach to reshaping the application's view of the data. * Omnidex can use different names for tables and columns by using the PHYSICAL clause in the TABLE or COLUMN sections of the CREATE TABLE statement to map to the underlying Oracle names. * Omnidex columns can often be assigned datatypes that differ from the Oracle datatype. Character-class datatypes can be interchanged, allowing applications to easily receive the datatype that works best for its needs. Binary datatypes can be assigned to any of the integer or floating point datatypes; in fact, this is a necessity since Oracle's NUMBER datatype is only an internal datatype. * Omnidex tables can include [[admin:features:expressioncols:home|Expression-based Columns]], which are columns derived from a SQL expression rather than a specific column in the underlying database. === Referencing Oracle Views === Omnidex table declarations can reference Oracle Views. Omnidex will retrieve from the Oracle view just as though it is a table. Oracle Views can be used to provide different views of the data, appropriate for the application. When referencing an Oracle view, it is necessary to declare a UNIQUE constraint. This requirement for the UNIQUE constraint is independent of any PRIMARY or FOREIGN constraints, discussed in the next page. The UNIQUE constraint tells Omnidex how to uniquely identify a row. When Omnidex retrieves individual rows, it will use this unique value; therefore, it is important that access to this column (or columns) be properly indexed in the underlying table. **Oracle CREATE VIEW Statement** <code> create view STATES_VIEW ( CTRY_DESCRIPTION, CTRY_CAPITAL, STATE_CD, DESCRIPTION, STATE_NUM, REGION_CD, COUNTRY_CD, TAX_RATE ) as select C.DESCRIPTION, C.CAPITAL, S.STATE_CD, S.DESCRIPTION, S.STATE_NUM, S.REGION_CD, S.COUNTRY_CD, S.TAX_RATE from SIMPLE.STATES S, SIMPLE.COUNTRIES C where S.COUNTRY_CD = C.COUNTRY_CD; </code> **Omnidex CREATE TABLE Statement** <code> create table "STATES_VIEW" physical "SIMPLE.STATES_VIEW" ( "CTRY_DESCRIPTION" STRING(47), "CTRY_CAPITAL" STRING(31), "STATE" CHARACTER(2) physical "STATE_CD", "DESCRIPTION" STRING(31), "STATE_CODE" CHARACTER(2) physical "STATE_NUM", "REGION" CHARACTER(2) physical "REGION_CD", "COUNTRY" CHARACTER(2) physical "COUNTRY_CD", "TAX_RATE" FLOAT, constraint STATES_STATE_UK unique ("STATE") ) in "simple.xml"; </code> ===== ===== **[[integration:rdbms:oracle:databases|Prev]]** | **[[integration:rdbms:oracle:constraints|Next]]** ====== Additional Resources ====== See also: {{page>:integration:rdbms:see_also&nofooter&noeditbtn}} {{page>:bottom_add&nofooter&noeditbtn}}

 
Back to top
integration/rdbms/oracle/tables.txt ยท Last modified: 2016/06/28 22:38 (external edit)
 
 
chimeric.de = chi`s home Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0