BeeBase

Programmable relational database
with graphical user interface Support This Project
This page is also available in Deutsch Français

Documentation

Below documentation is part of the BeeBase dictribution and is also available in PDF.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

13. Import and Export

For sharing your records with other databases, BeeBase offers a way to import and export records from and to other databases. Import and export is done by reading and writing text files. The text files must follow a special format described in the next section.


13.1 File Format

For importing records into BeeBase, all records of a table should be in a single text file. If records of several tables are to be imported, they should be in separate import files, one for each table.

An import file consists of lines and columns. Lines are separated by a record delimiter, columns by a field delimiter. The delimiters can be specified in the import and export dialog. Since a record field itself may contain such a delimiter, double quotes can be used around all fields for escaping delimiters.

The import file should be of the following structure:


13.2 Sample Import File

The following sample import file uses \n and \t for record and field delimiters and double quotes around all fields. The file can be imported into a table with the following fields:

 

"Name"	"NumChildrens"	"Feminine"	"Job"	"Notes"
"Janet Jackson"	"???"	"TRUE"	"Musician"	"Latest CD: The velvet rope"
"Bernt Schiele"	"???"	"NIL"	"Scientist"	"Research interests:
Robotics, Autonomy and Computer Vision"
"Gerhard"	"0"	"NIL"	"Precision mechanic"	""


13.3 Importing Records

To import records into the active table select menu item `Table - Import records'. This will open a window containing

If you press the `Import' button, BeeBase will load the specified file and import all found records. If everything went fine and new records were created in the table, BeeBase asks after the import process if you really want to add the newly imported records to the table. At this point you can still cancel the operation. Overwritten records, however, can only be recovered by reverting the project.

If an error occurs while reading the import file then an error message is shown.

If you need a more sophisticated import routine it is recommended to write your own import routine as a BeeBase program.


13.4 Exporting Records

To export records from the active table select menu item `Table - Export records'. This will open a window containing

After you pressed the `Export' button, BeeBase will open the specified file and write out the records including a header line containing the field names. The export feature always writes all fields of a table to the export file.

For a more customized export routine, you can use BeeBase' query editor (see Data retrieval) or you write your own export function as a BeeBase program.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated on September, 30 2024 using texi2html