Ignore:
Timestamp:
09/25/12 20:27:42 (10 years ago)
Author:
Philipp Spitzer <philipp@…>
Branches:
master, qt5
Children:
5293ef0
Parents:
0ba2b59
Message:

Suggestion for database schema version 001.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/dbschema001.sql

    r0ba2b59 r14c46c7  
    44    , subtitle VARCHAR
    55    , venue VARCHAR
    6     , city VARCHAR NOT NULL
    7     , start INTEGER NOT NULL
    8     , end INTEGER NOT NULL
    9     , days INTEGER
     6    , city VARCHAR
     7    , start INTEGER NOT NULL -- timestamp (Unix Epoch)
     8    , end INTEGER NOT NULL   -- timestamp (Unix Epoch)
    109    , day_change INTEGER
    1110    , timeslot_duration INTEGER
     
    1413
    1514CREATE TABLE TRACK ( id INTEGER  PRIMARY KEY AUTOINCREMENT  NOT NULL
    16     , xid_conference INTEGER NOT NULL
     15    , xid_conference INTEGER NOT NULL REFERENCES CONFERENCE(id)
    1716    , name VARCHAR NOT NULL
    1817    , UNIQUE (xid_conference, name));
    1918
    2019CREATE TABLE ROOM ( id INTEGER PRIMARY KEY AUTOINCREMENT  NOT NULL
    21     , xid_conference INTEGER NOT NULL
     20    , xid_conference INTEGER NOT NULL REFERENCES CONFERENCE(id)
    2221    , name VARCHAR NOT NULL
    23     , picture VARCHAR NOT NULL
     22    , picture VARCHAR
    2423    , UNIQUE (xid_conference, name));
    2524
    2625CREATE TABLE PERSON ( id INTEGER NOT NULL
    27     , xid_conference INTEGER NOT NULL
     26    , xid_conference INTEGER NOT NULL REFERENCES CONFERENCE(id)
    2827    , name VARCHAR NOT NULL
    29     , UNIQUE (xid_conference, name)
    3028    , PRIMARY KEY (id, xid_conference));
    3129
    32 CREATE TABLE EVENT ( xid_conference INTEGER  NOT NULL
     30CREATE TABLE EVENT ( xid_conference INTEGER  NOT NULL REFERENCES CONFERENCE(id)
    3331    , id INTEGER NOT NULL
    3432    , start INTEGER NOT NULL
     
    4442    , favourite INTEGER DEFAULT 0
    4543    , alarm INTEGER DEFAULT 0
    46     , PRIMARY KEY (xid_conference ,id)
    47     , FOREIGN KEY(xid_conference) REFERENCES CONFERENCE(id)
    48     , FOREIGN KEY(xid_track) REFERENCES TRACK(id));
     44    , PRIMARY KEY (xid_conference ,id));
    4945
    5046CREATE TABLE EVENT_PERSON ( xid_conference INTEGER NOT NULL
Note: See TracChangeset for help on using the changeset viewer.