Demo database

The demo database contains information about cars, their owners, and connections between owners. Relation view is presented on the picture below.

Demo database deployment is performed in three steps.

  1. Relation view tables creation.

    CREATE TABLE person (
      id varchar primary key,
      name varchar,
      lastname varchar,
      age bigint,
      city varchar,
      income int,
      dbl double,
      dtime datetime
    );
    CREATE TABLE car (
      id varchar primary key,
      model varchar,
      year int,
      color varchar,
      number varchar,
      owner varchar,
      FOREIGN KEY (owner) REFERENCES person
    );
    CREATE TABLE friend AS EDGE person person;
    CREATE TABLE owner AS EDGE car person;
    
  2. Data import from CSV files contained within the NitrosBase distribution.

    BULK INSERT person (id, name, lastname, age, city, income, dbl, dtime)
      FROM '../data/sntest1/person.csv'
      WITH (FIRSTROW = 2, FIELDTERMINATOR = ',');
    BULK INSERT car (id, model, year, color, number)
      FROM '../data/sntest1/car.csv'
      WITH (FIRSTROW = 2, FIELDTERMINATOR = ',');
    BULK INSERT friends
      FROM '../data/sntest1/friends.csv'
      WITH (FIRSTROW = 2, FIELDTERMINATOR = ',');
    BULK INSERT owner
      FROM '../data/sntest1/owner.csv'
      WITH (FIRSTROW = 2, FIELDTERMINATOR = ',');
    
  3. Indices creation.

    CREATE INDEX i_age ON person (age);
    CREATE INDEX i_city ON person (city);CREATE INDEX i_model ON car (model);