All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nologies.orientdb-community.3.2.34.source-code.demodb-1-schema.osql Maven / Gradle / Ivy

There is a newer version: 3.2.35
Show newest version
SET echo FALSE
SET verbose 0


CREATE CLASS DBInfo;
INSERT INTO DBInfo SET Name='SocialTravelAgency', Version='0.76';


CREATE CLASS Countries EXTENDS V;
CREATE PROPERTY Countries.Id LONG;
CREATE INDEX Countries.Id ON Countries(Id) UNIQUE;
CREATE PROPERTY Countries.Name STRING;
CREATE INDEX Countries.Name ON Countries(Name) FULLTEXT ENGINE LUCENE;
CREATE CLASS Profiles EXTENDS V;
CREATE PROPERTY Profiles.Id LONG;
CREATE PROPERTY Profiles.Name STRING;
CREATE PROPERTY Profiles.Surname STRING;
CREATE PROPERTY Profiles.Email STRING;
CREATE PROPERTY Profiles.Birthday DATE;
CREATE PROPERTY Profiles.Bio STRING;
CREATE INDEX Profiles.Id ON Profiles(Id) UNIQUE;
CREATE INDEX Profiles.Name_Surname ON Profiles(Name,Surname) FULLTEXT ENGINE LUCENE;
CREATE INDEX Profiles.Email ON Profiles(Email) UNIQUE;
CREATE INDEX Profiles.Birthday ON Profiles(Birthday) NOTUNIQUE;
CREATE INDEX Profiles.Bio ON Profiles(Bio) FULLTEXT ENGINE LUCENE;
CREATE CLASS Locations EXTENDS V;
CREATE PROPERTY Locations.Id LONG;
CREATE PROPERTY Locations.Type STRING;
CREATE PROPERTY Locations.Name STRING;
CREATE INDEX Locations.Type ON Locations(Type) NOTUNIQUE;
CREATE INDEX Locations.Name ON Locations(Name) FULLTEXT ENGINE LUCENE;
CREATE CLASS Services EXTENDS V, Locations;
CREATE CLASS Hotels EXTENDS V, Services;
CREATE INDEX Hotels.Id ON Hotels(Id) UNIQUE;
CREATE CLASS Restaurants EXTENDS V, Services;
CREATE INDEX Restaurants.Id ON Restaurants(Id) UNIQUE;
CREATE CLASS Attractions EXTENDS V, Locations;
CREATE CLASS Monuments EXTENDS V, Attractions;
CREATE INDEX Monuments.Id ON Monuments(Id) UNIQUE;
CREATE CLASS Castles EXTENDS V, Attractions;
CREATE INDEX Castles.Id ON Castles(Id) UNIQUE;
CREATE CLASS Theatres EXTENDS V, Attractions;
CREATE INDEX Theatres.Id ON Theatres(Id) UNIQUE;
CREATE CLASS ArchaeologicalSites EXTENDS V, Attractions;
CREATE INDEX ArchaeologicalSites.Id ON ArchaeologicalSites(Id) UNIQUE;
CREATE CLASS Customers EXTENDS V;
CREATE PROPERTY Customers.OrderedId LONG;
CREATE CLASS Reviews EXTENDS V;
CREATE PROPERTY Reviews.Id LONG;
CREATE PROPERTY Reviews.Text STRING;
CREATE INDEX Reviews.Text ON Reviews(Text) FULLTEXT ENGINE LUCENE;
CREATE CLASS Orders EXTENDS V;
CREATE PROPERTY Orders.Id LONG;
CREATE PROPERTY Orders.Amount LONG;
CREATE PROPERTY Orders.OrderDate DATE;
CREATE CLASS IsFromCountry EXTENDS E;
CREATE PROPERTY IsFromCountry.in LINK Countries;
CREATE PROPERTY IsFromCountry.out LINK Customers ;
CREATE CLASS HasUsedService EXTENDS E;
CREATE PROPERTY HasUsedService.out LINK Customers ;
CREATE CLASS HasStayed EXTENDS E, HasUsedService;
CREATE PROPERTY HasStayed.in LINK Hotels;
CREATE CLASS HasEaten EXTENDS E, HasUsedService;
CREATE PROPERTY HasEaten.in LINK Restaurants;
CREATE CLASS HasVisited EXTENDS E;
CREATE PROPERTY HasVisited.out LINK Customers ;
CREATE PROPERTY HasVisited.in LINK;
CREATE INDEX HasVisited.out_in ON HasVisited (`in`, `out`) UNIQUE;
CREATE CLASS HasProfile EXTENDS E;
CREATE PROPERTY HasProfile.in LINK Profiles;
CREATE PROPERTY HasProfile.out LINK Customers ;
CREATE CLASS HasCustomer EXTENDS E;
CREATE PROPERTY HasCustomer.in LINK Customers;
CREATE PROPERTY HasCustomer.out LINK Orders ;
CREATE CLASS HasReview EXTENDS E;
CREATE PROPERTY HasReview.in LINK Reviews;
CREATE PROPERTY HasReview.Stars INTEGER;
CREATE CLASS MadeReview EXTENDS E;
CREATE PROPERTY MadeReview.out LINK Customers ;
CREATE CLASS HasFriend EXTENDS E;
CREATE PROPERTY HasFriend.in LINK Profiles;
CREATE PROPERTY HasFriend.out LINK Profiles;
CREATE CLASS _studio;
INSERT INTO _studio SET type='GraphConfig', config = {'classes':{'ArchaeologicalSites':{'fill':'#ff7f0e','stroke':'#b25809','display':'Name','iconCss':'icon-bank', 'icon':'\ue950'},'Attractions':{'fill':'#778899','stroke':'#b28254','display':'Name'},'Locations':{'fill':'#FFA07A','stroke':'#b28254','display':'Name'},'Services':{'fill':'#FFDEAD','stroke':'#b28254','display':'Name'},'Castles':{'fill':'#730202','stroke':'#4f3d3d','display':'Name','iconCss':'icon-bookmark', 'icon':'\ue83a'},'Countries':{'fill':'#98df8a','stroke':'#6a9c60','display':'Name','iconCss':'icon-home', 'icon':'\ue82c'},'Customers':{'fill':'#d62728','stroke':'#951b1c','display':'OrderedId','iconCss':'icon-circle', 'icon':'\ue913'},'DBInfo':{'fill':'#aec7e8','stroke':'#798ba2'},'E':{'fill':'#000000','stroke':'#000000'},'HasCustomer':{'fill':'#1e701e','stroke':'#1e701e'},'HasEaten':{'fill':'#c5b0d5','stroke':'#951b1c'},'HasFriend':{'fill':'#5c0c9f','stroke':'#5c0c9f'},'HasProfile':{'fill':'#c49c94','stroke':'#951b1c'},'HasReview':{'fill':'#e377c2','stroke':'#797b7c'},'HasUsedService':{'fill':'#f7b6d2','stroke':'#951b1c'},'HasStayed':{'fill':'#f7b6d2','stroke':'#951b1c'},'HasVisited':{'fill':'#f7b6d2','stroke':'#951b1c'},'Hotels':{'fill':'#1f77b4','stroke':'#15537d','display':'Name','iconCss':'icon-h-sigh', 'icon':'\ue94c'},'IsFromCountry':{'fill':'#7f7f7f','stroke':'#951b1c'},'MadeReview':{'fill':'#c7c7c7','stroke':'#951b1c'},'Monuments':{'fill':'#bcbd22','stroke':'#838417','display':'Name','iconCss':'icon-building-filled', 'icon':'\ue94f'},'OFunction':{'fill':'#dbdb8d','stroke':'#999962'},'OGeometryCollection':{'fill':'#17becf','stroke':'#108590'},'OIdentity':{'fill':'#9edae5','stroke':'#6e98a0'},'OLineString':{'fill':'#1f77b4','stroke':'#15537d'},'OMultiLineString':{'fill':'#aec7e8','stroke':'#798ba2'},'OMultiPoint':{'fill':'#ff7f0e','stroke':'#b25809'},'OMultiPolygon':{'fill':'#ffbb78','stroke':'#b28254'},'OPoint':{'fill':'#2ca02c','stroke':'#1e701e'},'OPolygon':{'fill':'#98df8a','stroke':'#6a9c60'},'ORectangle':{'fill':'#d62728','stroke':'#951b1c'},'ORestricted':{'fill':'#ff9896','stroke':'#b26a69'},'ORole':{'fill':'#9467bd','stroke':'#674884'},'OSchedule':{'fill':'#c5b0d5','stroke':'#897b95'},'OSequence':{'fill':'#8c564b','stroke':'#623c34'},'OShape':{'fill':'#c49c94','stroke':'#896d67'},'OTriggered':{'fill':'#e377c2','stroke':'#9e5387'},'OUser':{'fill':'#f7b6d2','stroke':'#ac7f93'},'Orders':{'fill':'#2ca02c','stroke':'#1e701e','display':'Id','iconCss':'icon-basket', 'icon':'\ue882'},'Locations':{'fill':'#c7c7c7','stroke':'#8b8b8b','display':'Name'},'Profiles':{'fill':'#a922bd','stroke':'#5c0c9f','display':'Name','iconCss':'icon-user','icon':'\ue80c'},'Restaurants':{'fill':'#ec97e9','stroke':'#8e54bf','display':'Name','iconCss':'icon-food','icon':'\ue946'},'Reviews':{'fill':'#d6d9da','stroke':'#797b7c','display':'Id','iconCss':'icon-sliders', 'icon':'\ue881'},'Theatres':{'fill':'#9edae5','stroke':'#6e98a0','display':'Name','iconCss':'icon-music', 'icon':'\ue801'},'V':{'fill':'#000000','stroke':'#000000'},'_studio':{'fill':'#aec7e8','stroke':'#798ba2'}}},user=#5:0;

CREATE INDEX Customers.OrderedId ON Customers(OrderedId) UNIQUE;
CREATE INDEX Reviews.Id ON Reviews(Id) UNIQUE;
CREATE INDEX HasReview.Stars ON HasReview(Stars) NOTUNIQUE;
CREATE INDEX Orders.Id ON Orders(Id) UNIQUE;
CREATE INDEX Orders.Amount ON Orders(Amount) NOTUNIQUE;
CREATE INDEX Orders.OrderDate ON Orders(OrderDate) NOTUNIQUE;




© 2015 - 2024 Weber Informatics LLC | Privacy Policy