Shadowhelix:Datenbank/Umsetzung SQL

Aus Shadowhelix
< Shadowhelix:Datenbank
Version vom 26. Februar 2016, 10:32 Uhr von Loki (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „Skript für Tabellenerstellung: <pre> CREATE TABLE sources( id_source INTEGER(0) NOT NULL ,description TEXT NOT NULL ,language_code TEXT NOT NULL ,type…“)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen

Skript für Tabellenerstellung:

CREATE TABLE sources(
id_source      INTEGER(0) NOT NULL
,description   TEXT NOT NULL
,language_code TEXT NOT NULL
,type          TEXT
);

CREATE TABLE sources_catalog(
id_source     INTEGER(0) NOT NULL
,id_drivethru TEXT
,id_amazon    TEXT
,id_rpggeek   TEXT
);

CREATE TABLE contributors(
id_contributor   INTEGER(0) NOT NULL
,surname         TEXT NOT NULL
,surname_suffix  TEXT
,forename_first  TEXT
,forename_second TEXT
,forename_third  TEXT
,year_birth      TEXT
,year_death      TEXT
);

CREATE TABLE contributors_weblink(
id_contributor INTEGER(0) NOT NULL
,url           TEXT NOT NULL
);

CREATE TABLE contributions(
id_contributor       INTEGER(0) NOT NULL
,id_source           INTEGER(0) NOT NULL
,standard_descriptor TEXT NOT NULL
,uncredited          CHAR(1)
,title_contribution  TEXT
);

CREATE TABLE contributions__illustration(
id_contributor INTEGER(0) NOT NULL
,id_illustration INTEGER(0)
);

CREATE TABLE illustrations(
id_illustration INTEGER(0) NOT NULL
,id_constructed TEXT
);

CREATE TABLE illustrations_source(
id_illustration  INTEGER(0) NOT NULL
,id_source       INTEGER(0) NOT NULL
,issue           TEXT
,page_reference  TEXT
,entry_reference TEXT
,position        TEXT
);

CREATE TABLE illustrations_weblink(
id_illustration INTEGER(0) NOT NULL
,web_link       TEXT
,direct_link    TEXT
);

CREATE TABLE corporations_name(
id_corporation INTEGER(0) NOT NULL
,language_code TEXT
,short_name    TEXT
,full_name     TEXT
,abbreviation  TEXT
);

CREATE TABLE corporations_ownership(
id_corporation         INTEGER(0) NOT NULL
,id_corporation_owner  INTEGER(0)
,id_organisation_owner INTEGER(0)
,id_person_owner       INTEGER(0)
,fraction              TEXT
,from_year             TEXT
,from_month            TEXT
,to_year               TEXT
,to_month              TEXT
);

CREATE TABLE products_name(
id_product     INTEGER(0) NOT NULL
,language_code TEXT
,name          TEXT
);

CREATE TABLE products_source(
id_product       INTEGER(0) NOT NULL
,id_source       INTEGER(0)
,issue           TEXT
,page_reference  TEXT
,entry_reference TEXT
);

CREATE TABLE products_type(
id_product   INTEGER(0) NOT NULL
,id_type     INTEGER(0)
);

CREATE TABLE types(
id_type        INTEGER(0) NOT NULL
,language_code TEXT
,name          TEXT
);

CREATE TABLE shadow_matrix_users(
id_user    INTEGER(0) NOT NULL
,id_person INTEGER(0)
,name      TEXT
);

CREATE TABLE shadow_matrix_shadowtalk_source(
id_user          INTEGER(0) NOT NULL
,id_source       INTEGER(0) NOT NULL
,issue           TEXT
,page_reference  TEXT
,entry_reference TEXT
);