Data Definition Files

From InterBase
Jump to: navigation, search

Since you’ve already created several domains, you can use an SQL script—also called a data definition file—to create the rest of the domains. A data definition file is a text file that contains SQL statements. It can be executed in IBConsole and is typically created with a text editor such as Notepad.

It is often convenient to create a data definition file rather than typing each statement directly into IBConsole, because the text editor provides you with an editing environment and the script provides a reusable record of what was entered. In practice, most data definition is accomplished using data definition files.

Tip: Every SQL script must begin with a CONNECT statement. The CONNECT statement specifies a database name including the complete path, a user name, and password. The SQL scripts that accompany this tutorial begin with the following CONNECT statement:

CONNECT '<path>\Embarcadero\Interbase\gds_db\tutorial.gdb' USER 'TUTOR' PASSWORD 'tutor4ib'

If this is not the correct information for you, you must edit each SQL file and make the CONNECT string correct. The SQL scripts are text files that you can modify in any text editor. If you use an application that saves by default in a proprietary format, be sure to save the files as text.

Advance To:

Running an SQL Script