9. Creating Databases : How a Database Is Created : How the Createdb Command Works
 
Share this page                  
How the Createdb Command Works
A database is created using the createdb system command (or the equivalent operation in Director or VDBA). When the createdb command is executed, the following occurs:
The system catalogs in the master database (iidbdb) are updated.
Subdirectories are created under the database location 'default' and 'vectorwise' for the database, with the name of the database.
Similarly, directories are created under the work, journal, dump, and checkpoint locations for the database. These directories may not be created at the time the database is created, but at the time, for example, that a checkpoint is first run against the database.
The configuration file (aaaaaaaa.cnf) and the core system catalogs (aaaaaaax.t00, x=b through e) are created in the new 'default' database directory.
The DBMS system catalogs for the new database are created and modified.
The standard catalog interface is created.
The user interface system catalogs (restricted by any -f flag options) are created.
Select permission for the system catalogs is granted to public.
The folder structures 'wal' and 'CBM' are created in the new 'vectorwise' database directory. Within these are a number of subfolders and files that are maintained by the x100_server. The wal folder contains all the Write-Ahead Log information for a database. The CBM folder contains the actual data for the tables.
Note:   
Until data is inserted into a table there may not be any physical files associated with it.
When data is inserted a few rows at a time (less than three) there may be no physical files created for the table until a threshold is reached that triggers propagating the PDT data to table files.