Entering content frame

Object documentation PAGES, RECORDS Locate the document in the library structure

Definition

PAGES and RECORDS are possible formats for a data stream and are explained in more detail below.

Use

You have to use one of the two formats in the commands: EXPORT DB, EXPORT USER and EXPORT SCHEMA or IMPORT DB, IMPORT USER and IMPORT SCHEMA.

For these commands, the Loader assumes that the data streams are in the PAGES format. Hence, you do not have to specify the format PAGES. If you do not want to use the PAGES format, you have to explicitly specify the RECORDS format in a command for exporting (or importing).

You can also use the PAGES and RECORDS formats in the EXPORT TABLE and IMPORT TABLE commands. However, you always have to explicitly specify the formats PAGES or RECORDS in an EXPORT TABLE or IMPORT TABLE command as the default value is CSV.

The PAGES and RECORDS formats are binary formats specific to the Loader. Users should not make any manual alterations to the data streams. The data is not readable in this format.

You can specify the format you want in commands for exporting and importing using the syntax rules for the data format table_dataformat_spec and the data stream outstream_pages_spec, instream_pages_spec, outstream_records_spec, import_records_spec.

See also:

Data Format, Data Stream

PAGES

The data is stored in the data stream as pages.

     EXPORT TABLE: the Loader generates a single data stream.

     EXPORT DB, EXPORT USER, EXPORT SCHEMA: the Loader generates at least two data streams. Depending on the data volume being exported, more than two data streams can be generated.

The names of the data streams are mapped as follows: 4 digits are attached to each name, starting with 0000. The maximum number of data streams is therefore fixed at 9999.

The data stream with the digit sequence 0000 is known as the mapping file. The Loader saves information for managing the data streams during import in this file. The file is readable but should not be changed.

Data streams with the sequence of digits 0001 and higher contain the actual data; that is, the application data from the tables is saved in pages.

The data stream(s) with the application data contain(s) all of a table's application data, including the LONG values, if there are any.

The PAGES format makes it possible to export or import very quickly using special commands that are only available to the Loader. No log entries are written during import and the table is then write-protected. If table data was imported in the PAGES format, it can then only be changed if the data was backed up incrementally or completely.

Concepts of the Database System, Structure linkBacking Up Data

EXPORT/IMPORT TABLE

When you export or import a table in the PAGES format, you cannot make any other entries for the columns. All the relevant information is already contained in the data streams.

You cannot import the data into a table if either of the following situations occurs:

     The table’s binary structure is different than the structure in the source table

     The table you want to import the data into already contains data

In both cases, the Loader terminates the IMPORT with an error.

Examples

Example

EXPORT USER DATA OUTSTREAM 'mona_pages.data'

Exporting the application data from database user MONA to the mona_pages.data data stream in the PAGES format (default value)

Mapping file mona_pages.data0000

"HOTEL","CITY","1","?","?","?","?","mona.pages0001","FILE","?","PAGES","ASCII","0","1024","0","66560","0","0"

"HOTEL","CUSTOMER","2","?","?","?","?","mona.pages0001","FILE","?","PAGES","ASCII","0","66560","0","132096","0","0"

"HOTEL","HOTEL","3","?","?","?","?","mona.pages0001","FILE","?","PAGES","ASCII","0","132096","0","214016","0","0"

"HOTEL","ROOM","4","?","?","?","?","mona.pages0001","FILE","?","PAGES","ASCII","0","214016","0","279552","0","0"

"HOTEL","EMPLOYEE","5","?","?","?","?","mona.pages0001","FILE","?","PAGES","ASCII","0","279552","0","345088","0","0"

"HOTEL","RESERVATION","6","?","?","?","?","mona.pages0001","FILE","?","PAGES","ASCII","0","345088","0","410624","0","0"

Loader Tutorial, Structure linkExporting, Structure linkImporting

RECORDS

The data is stored in a binary format specific to the Loader, not unlike a database record in the data stream.

     EXPORT TABLE: the Loader generates a single data stream.

     EXPORT DB, EXPORT USER, EXPORT SCHEMA: the Loader generates two data streams.

The names of the data streams are mapped as follows; 4 digits are attached to each name, either 0000 or 0001.

The data stream with the digit sequence 0000 is known as the mapping file. The Loader saves information for managing the data streams during import in this file. The file is readable but should not be changed.

Data streams with the sequence of digits 0001 contain the actual data, that is, the application data from the tables is saved one piece after another.

The data stream with the application data contains all of a table's application data, including the LONG values, if there are any.

If the RECORDS format is used, then the Loader uses normal mass SELECT and mass INSERT statements which it generates itself.

Examples

Example

EXPORT USER DATA OUTSTREAM 'mona_records.data' RECORDS

Export the application data from database user MONA to the mona_records.data data stream in the RECORDS format

Mapping file mona_records.data0000

"HOTEL","CITY","1","?","?","?","?","mona.records0001","FILE","?","RECORDS","ASCII","0","0","0","2610","0","1586"

"HOTEL","CUSTOMER","2","?","?","?","?","mona.records0001","FILE","?","RECORDS","ASCII","0","2610","0","5463","0","4439"

"HOTEL","HOTEL","3","?","?","?","?","mona.records0001","FILE","?","RECORDS","ASCII","0","5463","0","10240","0","9216"

"HOTEL","ROOM","4","?","?","?","?","mona.records0001","FILE","?","RECORDS","ASCII","0","10240","0","13199","0","12175"

"HOTEL","EMPLOYEE","5","?","?","?","?","mona.records0001","FILE","?","RECORDS","ASCII","0","13199","0","15552","0","14528"

"HOTEL","RESERVATION","6","?","?","?","?","mona.records0001","FILE","?","RECORDS","ASCII","0","15552","0","18033","0","17009"

 

See also:

CSV, FWV, FWV BINARY

 

Leaving content frame