The demo database contains information about cars, their owners and connections between owners. Relational view is presented on the picture below.
Demo database deployment is performed in three steps.
Relational view tables creation.
CREATE TABLE person ( name varchar, lastname varchar, age bigint, city varchar, income int, dbl double, dtime datetime ); CREATE TABLE car ( 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;
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 = ',');
CREATE INDEX i_age ON person (age); CREATE INDEX i_city ON person (city);CREATE INDEX i_model ON car (model);