add Event and Domain concepts, + minor improvements

This commit is contained in:
Helmut Merz 2021-02-28 10:34:10 +01:00
parent 1db6a82de7
commit 54f0f8aab3
2 changed files with 19 additions and 7 deletions

View file

@ -1,24 +1,36 @@
-- storage-common/qgsql/graph/load_basic.sql
-- load bootstrap and basic semantic steps
-- basic concepts with fixed IDs
-- bootstrap concepts with fixed IDs
insert into steps (id, item, property, valtype, numval, textval) values
(1, 1, 2, 3, 1, null), -- root: root assert root
(2, 1, 2, 3, 2, null), -- assert: root assert assert
(3, 1, 2, 3, 3, null), -- Class: root assert Class
(4, 1, 2, 3, 4, null), -- type: root assert type
(5, 1, 2, 3, 5, null), -- Property: root assert Property
(6, 1, 2, 3, 6, null); -- ref: root assert ref
(6, 1, 2, 3, 6, null), -- ref: root assert ref
(7, 1, 2, 3, 6, null), -- Event: root assert Event
(8, 1, 2, 3, 6, null); -- Domain: root assert Domain
-- basic types and refs
insert into steps (item, property, valtype, numval, textval) values
(1, 4, 3, 8, null), -- root type Domain
(2, 4, 3, 5, null), -- assert type Property
(3, 4, 3, 3, null), -- Class type Class
(5, 4, 3, 3, null), -- property type Class
(4, 4, 3, 5, null), -- type type Property
(5, 4, 3, 3, null), -- property type Class
(6, 4, 3, 5, null), -- ref type Property
(7, 4, 3, 3, null), -- Event type Class
(8, 4, 3, 3, null), -- Domain type Class
(1, 6, 1, null, 'root'), -- root ref "root"
(2, 6, 1, null, 'assert'), -- assert ref "assert"
(4, 6, 1, null, 'type'), -- type ref "type"
(3, 6, 1, null, 'Class'), -- Class ref "Class"
(4, 6, 1, null, 'type'), -- type ref "type"
(5, 6, 1, null, 'Property'), -- Property ref "Property"
(6, 6, 1, null, 'ref'); -- ref ref "ref"
(6, 6, 1, null, 'ref'), -- ref ref "ref"
(7, 6, 1, null, 'Event'), -- Event ref "Event"
(8, 6, 1, null, 'Domain'); -- Domain ref "Domain"
-- let IDs for steps added later start with 101
select setval('steps_id_seq', 100)
-- alter sequence steps_id_seq restart 101;

View file

@ -1,8 +1,8 @@
-- storage-common/qgsql/graph/tables.sql
-- a simple generic RDF-like graph storage using only one tabel
create sequence steps_id_seq start with 11;
-- note: bootstrap rows get explicit IDs
create sequence steps_id_seq start with 21;
-- note: bootstrap rows (concepts) get explicit IDs
create table steps (
id bigint not null primary key default nextval('steps_id_seq'),