cpt
This commit is contained in:
@@ -1,3 +1,23 @@
|
||||
/*C1*/SET SCHEMA SYSTEM_LOBS
|
||||
INSERT INTO BLOCKS VALUES(0,2147483647,0)
|
||||
COMMIT
|
||||
/*C2*/SET SCHEMA PUBLIC
|
||||
create sequence Quizz_SEQ start with 1 increment by 50
|
||||
create sequence Reponse_SEQ start with 1 increment by 50
|
||||
create table Choix (Choix_Id integer not null, choix varchar(255) array, primary key (Choix_Id))
|
||||
create table Question (bonne_reponse integer unique, id integer generated by default as identity (start with 1), primary key (id))
|
||||
create table Quizz (id integer not null, id_utilisateur integer, session_codePIN integer, primary key (id))
|
||||
create table Reponse (id integer not null, question_id integer unique, Type_reponse varchar(31) not null, reponses varchar(255) array, primary key (id))
|
||||
create table ReponseCourte (RC_Id integer not null, value varchar(255), primary key (RC_Id))
|
||||
create table Session (codePIN integer generated by default as identity (start with 1), theme varchar(255), primary key (codePIN))
|
||||
create table Utilisateur (id integer generated by default as identity (start with 1), email varchar(255) unique, name varchar(255), password varchar(255), primary key (id))
|
||||
create table utilisateur_session (session_pin integer not null, utilisateur_id integer not null)
|
||||
alter table Choix add constraint FK15f4fgmtoco1tg4rra1vualr5 foreign key (Choix_Id) references Reponse
|
||||
alter table Question add constraint FKht8pe2o5v6sff88mr3pbh40f6 foreign key (bonne_reponse) references Reponse
|
||||
alter table Quizz add constraint FK3d0s5ih3homovqibbm72mvn2j foreign key (session_codePIN) references Session
|
||||
alter table Quizz add constraint FKlsvn0pvga68ummfyividlwggh foreign key (id_utilisateur) references Utilisateur
|
||||
alter table Reponse add constraint FKgdr6si626nqixg8qyfx6s0pjl foreign key (question_id) references Question
|
||||
alter table ReponseCourte add constraint FKocs5t60ov4kwoom69761ay7qd foreign key (RC_Id) references Reponse
|
||||
alter table utilisateur_session add constraint FK8x6kccp60a5ki9i4wihglhgqm foreign key (session_pin) references Session
|
||||
alter table utilisateur_session add constraint FK4f5dgiwf12kd9vrhsc6s4x2pk foreign key (utilisateur_id) references Utilisateur
|
||||
DISCONNECT
|
||||
|
||||
Reference in New Issue
Block a user