Migrating data into InterBase

Abstract: This article gives you suggestions on how migrate the most mundane to the most complex of data into InterBase

There are many paths to take to migrate your data into InterBase. Below are a number of paths to explore in this process.

  • Use external files to import fixed length data. See InterBase Data Definition Guide Manual, Chapter 6, section labeled "Importing External Files". Simple example from documentation:

CREATE TABLE EXT_TBL EXTERNAL FILE 'file.txt'
(FNAME CHAR(10),
LNAME CHAR(20),
HDATE CHAR(8),
NEWLINE CHAR(1));

CREATE TABLE PEOPLE
(FIRST_NAME CHAR(10),
LAST_NAME CHAR(20),
HIRE_DATE CHAR(8),
NEW_LINE CHAR(1));

INSERT INTO PEOPLE SELECT FNAME, LNAME, CAST(HDATE AS DATE),
NEWLINE FROM EXT_TBL;

  • Use IBConsole to import a variety of file formats. First create your target table in IBConsole (or any tool that can execute a SQL statement against an InterBase database), then open the table in IBConsole and select the Data tab. Right click in the grid and select Import Data. In the dialog presented you will be able select a Comma Delimited File (CSV), a fixed length file (TXT), an XML file or a raw file (IBX). The InterBase Operations guide manual, chapter 3, discusses how to work with Tables in IBConsole.
  • Use a Data Pump. There are a variety of tools in this space and most are not specific to InterBase, and and do not need be. As long as the tool can connect to your source database and to InterBase, it is likely to work. Any tool that has JDBC connectivity or ODBC connectivity should be able to connect to InterBase. However, there is one Data Pump specific to InterBase and you can get it here: http://cc.embarcadero.com/item/23688. A Data Pump is the recommend path for customers who do not want to invest in the ER/Studio - Change Manager combination presented below.
  • Create your own customized process using RAD Studio. The TFDBatchMove component is the basis for creating a customized import process. RAD Studio XE7 has an example using TFDBatchMove in the sample files folder located in Object Pascal\Database\FireDAC\Samples\Comp Layer\TFDBatchMove\Main. TFDBatchMOve is the recommend path for RAD Studio customers who need a customized interface in their application to import data into InterBase or export data out of InterBase.