Difference between revisions of "SQL CREATE BRIDGE"
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
Line 60: | Line 60: | ||
|ALIAS=<aliasname>||The name to use to access the file. | |ALIAS=<aliasname>||The name to use to access the file. | ||
|- | |- | ||
− | |INDEXKEY1=<index> | + | |INDEXKEY1=<index>...INDEXKEY7=<index>||RMS only. For RMS Indexed Sequential files specify the existing RMS index keys. For RMS Relative and Sequential file structures you can build Recital single indexes and associate them with the bridge file. In these cases, specify the full index filenames. |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | INDEXKEY7=<index>||RMS only. For RMS Indexed Sequential files specify the existing RMS index keys. For RMS Relative and Sequential file structures you can build Recital single indexes and associate them with the bridge file. In these cases, specify the full index filenames. | + | |
|- | |- | ||
|} | |} |
Revision as of 16:47, 19 March 2009
Contents
CREATE BRIDGE
Class
SQL Applications
Purpose
Creates a Recital bridge file for connection to RMS or C-ISAM data files
Syntax
CREATE BRIDGE <bridge>
TYPE <bridgetype> EXTERNAL <externalname> METADATA <metadataname> ALIAS <aliasname>
[INDEX <index> [, <index>]]
| AS <cKeyPairString>
See Also
ALTER TABLE, CREATE TABLE, DROP BRIDGE, DROP TABLE
Description
The CREATE BRIDGE command is used to create a bridge file to an external C-ISAM or RMS file. Recital clients can access Informix compatible C-ISAM files and the following fixed length RMS File types: RMS Indexed Sequential, RMS Relative and RMS Sequential. Data access is achieved through a bridge. This requires the creation of a bridge file and an empty Recital table that has a structure matching that of the external file. The empty Recital table can be created using the SQL CREATE command or the Recital Terminal Developer CREATE Development Tool. By convention, the empty structure file is given the file extension '.str' rather than the default '.dbf', which is often given to the bridge file instead.
Keywords | Description | Maximum Width (Characters) |
---|---|---|
bridge | The name of the bridge file. The file extension defaults to '.brg'. | 10 + file extension |
bridgetype | External data file type: CISAM, RMSIDX, RMSREL or RMSSEQ. | 10 |
externalname | Name of the external data file. | 80 |
metadataname | Name of the Recital structure table. | 80 |
aliasname | The name to use to access the file. | 10 |
index | RMS only. For RMS Indexed Sequential files specify the existing RMS index keys. For RMS Relative and Sequential file structures you can build Recital single indexes and associate them with the bridge file. In these cases, specify the full index filenames. | 50 |
The AS <cKeyPairString> is defined using the following key pairs:
Key Pair | Description |
---|---|
TYPE=<bridgetype> | External data file type: CISAM, RMSIDX, RMSREL or RMSSEQ. |
EXTERNAL=<externalname> | Name of the external data file. |
METADATA=<metadataname> | Name of the Recital structure table. |
ALIAS=<aliasname> | The name to use to access the file. |
INDEXKEY1=<index>...INDEXKEY7=<index> | RMS only. For RMS Indexed Sequential files specify the existing RMS index keys. For RMS Relative and Sequential file structures you can build Recital single indexes and associate them with the bridge file. In these cases, specify the full index filenames. |
Each key pair is separated by a semi-colon, ';'.
Example
exec sql CREATE BRIDGE cisamdemo.dbf TYPE "CISAM" EXTERNAL "cisamdemo.dat" METADATA "cisamdemo.str" ALIAS "cisamdemo"; //or exec sql CREATE BRIDGE cisamdemo.dbf AS "TYPE=CISAM;EXTERNAL=cisamdemo.dat;METADATA=cisamdemo.str;ALIAS=cisamdemo"; exec sql CREATE BRIDGE rmsidxdemo.dbf TYPE "RMSIDX" EXTERNAL "rmsidx.dat" METADATA "rmsidxdemo.str" ALIAS "rmsidxdemo" INDEX "acc_prefix+acc_no,acc_prefix+str(ord_total)"; //or exec sql CREATE BRIDGE rmsidxdemo.dbf AS "type=RMSIDX;external=rmsidx.dat;metadata=rmsidxdemo.str;alias=rmsidxdemo;; indexkey1=acc_prefix+acc_no;indexkey2=acc_prefix+str(ord_total)"; exec sql CREATE BRIDGE rmsreldemo.dbf TYPE "RMSRELX" EXTERNAL "rmsrel.dat" METADATA "rmsreldemo.str" ALIAS "rmsreldemo" INDEX "ind1.ndx,ind2.ndx,ind3.ndx"; //or exec sql CREATE BRIDGE rmsreldemo.dbf AS "type=RMSREL;external=rmsrel.dat;metadata=rmsreldemo.str;alias=rmsreldemo;; indexkey1=ind1.ndx;indexkey2=ind2.ndx,indexkey3=ind3.ndx";
Products
Recital Database Server, Recital Mirage Server, Recital Terminal Developer