You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

11 lines
836 B

-- categorie of the categorie
CREATE TABLE sous_categorie(sous_cat_id INTEGER PRIMARY KEY, sous_cat_tab INTEGER NOT NULL, sous_cat_titre VARCHAR(255) NOT NULL);
-- categorie of the event
CREATE TABLE categorie(cat_id INTEGER PRIMARY KEY, cat_titre VARCHAR(255) NOT NULL, sous_cat_id INTEGER NOT NULL, FOREIGN KEY(sous_cat_id) REFERENCES sous_categorie(sous_cat_id));
-- event
CREATE TABLE event(event_id INTEGER PRIMARY KEY, event_titre VARCHAR(255) NOT NULL, event_localisation VARCHAR(255) NOT NULL, event_dtstart DATETIME NOT NULL, event_dtend DATETIME NOT NULL, event_description TEXT NOT NULL, event_url VARCHAR(255) NULL);
-- table joining events to its categorie
CREATE TABLE eventCategorie(event_id INTEGER, cat_id INTEGER, FOREIGN KEY(event_id) REFERENCES event(event_id), FOREIGN KEY(cat_id) REFERENCES categorie(cat_id));