6.3.2. The CREATE DATABASE statement
Now you can create your new database interactively. Let’s suppose that you want to create a database named test.fdb
and store it in a directory named data
on your D
drive:
SQL>create database 'D:\data\test.fdb' page_size 8192
CON>user 'sysdba' password 'masterkey';
|
The database will be created and, after a few moments, the SQL prompt will reappear. You are now connected to the new database and can proceed to create some test objects in it.
But to verify that there really is a database there, let’s first type in this query:
SQL>select * from rdb$relations;
Although you haven’t created any tables yet, the screen will fill up with a large amount of data! This query selects all of the rows in the system table RDB$RELATIONS
, where Firebird stores the metadata for tables. An “empty” database is not really empty: it contains a number of system tables and other objects. The system tables will grow as you add more user objects to your database.
To get back to the command prompt type QUIT
or EXIT
, as explained in the section on connecting.