Step 3: Define the Database Schema

After you create a database, you define its schema:

  1. On the Administration Tools Configuration Menu, click Main Menu and click OK.
  2. Click Connect to Database and click OK.

    You'll see the following prompt:

    Welcome to vsql, the Vertica Analytic Database interactive terminal.
    Type:  \h or \? for help with vsql commands
           \g or terminate with semicolon to execute query
           \q to quit
    
    =>
    =>
  3. To create the logical schema, run the SQL schema definition script using the \i meta-command in vsql:

    vmartdb=> \i vmart_define_schema.sql

    A series of CREATE TABLE and ALTER TABLE statement scrolls on the terminal window:

    Define vmart database script (tutorial)

    The vmart_define_schema.sql file creates the tables and referential integrity constraints that make up the logical schema.

  4. Next, load the database data into this schema.