Designing scheme by charts

Subbranch
Al-P 3 years ago
parent af31dd2d52
commit 3302091235
  1. 6
      src/Database Design/database structure
  2. 66
      src/Database Design/mysql script

@ -34,10 +34,8 @@
Organisation-Know_How_Background(OKNID,OID,KNID)
#0,*-1,*
Event-Tag(ETID,TID,EID)
#0*,0*
#?
#1*,0*
Event-Location(ELID,EID,TID)
#1,*-0*
Event-Event_Kategorie(EEKID,EID,EKID)
#1,*-0,*
#?
#1,*-0,*

@ -0,0 +1,66 @@
CREATE TABLE `News` (
`NID` INT NOT NULL AUTO_INCREMENT,
`Content` VARCHAR CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
`Teaser` VARCHAR CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
`StartDate` DATE NOT NULL,
`EndDate` DATE,
FULLTEXT `Index_Content` (`Content`) USING BTREE,
KEY `Index_EndDate` (`EndDate`) USING BTREE,
PRIMARY KEY (`NID`)
);
CREATE TABLE `Event` (
`EID` INT NOT NULL AUTO_INCREMENT,
`ETitle` VARCHAR NOT NULL,
`EDate` DATE NOT NULL,
`EUrl` VARCHAR,
FULLTEXT `Index_ETitle` (`ETitle`,`EUrl`) USING BTREE,
KEY `Index_EDate` (`EDate`) USING BTREE,
PRIMARY KEY (`EID`)
);
CREATE TABLE `Organisation` (
`OID` INT NOT NULL AUTO_INCREMENT,
`OName` VARCHAR NOT NULL,
`ODescription` VARCHAR,
`OUrl` VARCHAR,
`OContact` INT,
KEY `Organisation` (`OName`,`ODescription`,`OUrl`,`OContact`) USING BTREE,
PRIMARY KEY (`OID`)
);
CREATE TABLE `Location` (
`LID` INT NOT NULL AUTO_INCREMENT,
`LTitle` VARCHAR,
`LStreetNr` VARCHAR,
`LPostalCode` VARCHAR,
`LCity` VARCHAR,
`LCountry` VARCHAR,
`LLon` VARCHAR,
`LLat` VARCHAR,
KEY `Index_Location` (`LTitle`,`LStreetNr`,`LPostalCode`,`LCity`,`LCountry`) USING BTREE,
PRIMARY KEY (`LID`)
);
Know_How_Background(KNID)
Event_Kategorie(EKID)
Tag(TID)
News_Kategorie(NKID)
Channel_Kategorie(CKID)
CREATE TABLE `News-News_Kategorie` (
`NNKID` INT NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`NNKID`)
FOREIGN KEY (NID) REFERENCES News(NID)
FOREIGN KEY (NKID) REFERENCES News_Kategorie(NKID)
);
News-Channel_Kategorie(NCKID,NID,CKID)
News-Tag(TNID,TID,NID)
News-Event(NEID,NID,EID)
News-Organisation(NOID,NID,OID)
News_Kategorie-Organisation(NKOID,NKID,OID)
Organisation-Location(OLID,OID,LID)
Organisation-Know_How_Background(OKNID,OID,KNID)
Event-Tag(ETID,TID,EID)
Event-Location(ELID,EID,TID)
Event-Event_Kategorie(EEKID,EID,EKID)
Loading…
Cancel
Save