Difference between revisions of "SQL CREATE BRIDGE"
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Creates a Recital bridge file for connection to RMS or C-ISAM data files | Creates a Recital bridge file for connection to RMS or C-ISAM data files | ||
Line 25: | Line 18: | ||
==Description== | ==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 | + | 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 [[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. |
Line 60: | Line 53: | ||
|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. | + | |
|- | |- | ||
|} | |} | ||
+ | |||
Each key pair is separated by a semi-colon, ';'. | Each key pair is separated by a semi-colon, ';'. | ||
Line 75: | Line 63: | ||
==Example== | ==Example== | ||
<code lang="recital"> | <code lang="recital"> | ||
− | + | CREATE BRIDGE cisamdemo.dbf; | |
− | CREATE BRIDGE cisamdemo.dbf | + | TYPE "CISAM"; |
− | TYPE "CISAM" | + | EXTERNAL "cisamdemo.dat"; |
− | EXTERNAL "cisamdemo.dat" | + | METADATA "cisamdemo.str"; |
− | METADATA "cisamdemo.str" | + | ALIAS "cisamdemo" |
− | ALIAS "cisamdemo" | + | |
//or | //or | ||
− | + | CREATE BRIDGE cisamdemo.dbf; | |
− | CREATE BRIDGE cisamdemo.dbf | + | AS "TYPE=CISAM;EXTERNAL=cisamdemo.dat;METADATA=cisamdemo.str;ALIAS=cisamdemo" |
− | AS "TYPE=CISAM;EXTERNAL=cisamdemo.dat;METADATA=cisamdemo.str;ALIAS=cisamdemo" | + | |
− | + | CREATE BRIDGE rmsidxdemo.dbf; | |
− | CREATE BRIDGE rmsidxdemo.dbf | + | TYPE "RMSIDX"; |
− | TYPE "RMSIDX" | + | EXTERNAL "rmsidx.dat"; |
− | EXTERNAL "rmsidx.dat" | + | METADATA "rmsidxdemo.str"; |
− | METADATA "rmsidxdemo.str" | + | ALIAS "rmsidxdemo"; |
− | ALIAS "rmsidxdemo" | + | INDEX "acc_prefix+acc_no,acc_prefix+str(ord_total)" |
− | INDEX "acc_prefix+acc_no,acc_prefix+str(ord_total)" | + | |
//or | //or | ||
− | + | CREATE BRIDGE rmsidxdemo.dbf; | |
− | CREATE BRIDGE rmsidxdemo.dbf | + | AS "type=RMSIDX;external=rmsidx.dat;metadata=rmsidxdemo.str;alias=rmsidxdemo;; |
− | AS "type=RMSIDX;external=rmsidx.dat;metadata=rmsidxdemo.str;alias=rmsidxdemo;; | + | indexkey1=acc_prefix+acc_no;indexkey2=acc_prefix+str(ord_total)" |
− | indexkey1=acc_prefix+acc_no;indexkey2=acc_prefix+str(ord_total)" | + | |
− | + | CREATE BRIDGE rmsreldemo.dbf; | |
− | CREATE BRIDGE rmsreldemo.dbf | + | TYPE "RMSRELX"; |
− | TYPE "RMSRELX" | + | EXTERNAL "rmsrel.dat"; |
− | EXTERNAL "rmsrel.dat" | + | METADATA "rmsreldemo.str"; |
− | METADATA "rmsreldemo.str" | + | ALIAS "rmsreldemo"; |
− | ALIAS "rmsreldemo" | + | INDEX "ind1.ndx,ind2.ndx,ind3.ndx" |
− | INDEX "ind1.ndx,ind2.ndx,ind3.ndx" | + | |
//or | //or | ||
− | + | CREATE BRIDGE rmsreldemo.dbf; | |
− | CREATE BRIDGE rmsreldemo.dbf | + | AS "type=RMSREL;external=rmsrel.dat;metadata=rmsreldemo.str;alias=rmsreldemo;; |
− | AS "type=RMSREL;external=rmsrel.dat;metadata=rmsreldemo.str;alias=rmsreldemo;; | + | indexkey1=ind1.ndx;indexkey2=ind2.ndx,indexkey3=ind3.ndx" |
− | indexkey1=ind1.ndx;indexkey2=ind2.ndx,indexkey3=ind3.ndx" | + | |
</code> | </code> | ||
==Products== | ==Products== | ||
− | Recital | + | Recital Server, Recital |
+ | [[Category:Documentation]] | ||
+ | [[Category:SQL|CREATE BRIDGE]] | ||
+ | [[Category:Commands]] |
Latest revision as of 17:39, 22 December 2009
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 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
CREATE BRIDGE cisamdemo.dbf; TYPE "CISAM"; EXTERNAL "cisamdemo.dat"; METADATA "cisamdemo.str"; ALIAS "cisamdemo" //or CREATE BRIDGE cisamdemo.dbf; AS "TYPE=CISAM;EXTERNAL=cisamdemo.dat;METADATA=cisamdemo.str;ALIAS=cisamdemo" 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 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)" CREATE BRIDGE rmsreldemo.dbf; TYPE "RMSRELX"; EXTERNAL "rmsrel.dat"; METADATA "rmsreldemo.str"; ALIAS "rmsreldemo"; INDEX "ind1.ndx,ind2.ndx,ind3.ndx" //or 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 Server, Recital