Skip to content
Snippets Groups Projects
Unverified Commit 2c10b43d authored by Jangberry (Nomad-Debian)'s avatar Jangberry (Nomad-Debian)
Browse files

Compatibilité mariadb

parent 73cc907c
No related branches found
No related tags found
No related merge requests found
......@@ -13,6 +13,7 @@
-- ________________
create database MAIN;
USE MAIN;
-- DBSpace Section
......@@ -175,17 +176,11 @@ alter table interesse_par add constraint FKint_MOT
foreign key (mot)
references MOT_CLE;
alter table LIVRE add constraint ID_LIVRE_CHK
check(exists(select * from PUBLICATION
where PUBLICATION.ISBN = ISBN));
alter table LIVRE add constraint ID_LIVRE_CHK
check(exists(select * from ecrit_par
where ecrit_par.ISBN = ISBN));
alter table PERIODIQUE add constraint ID_PERIODIQUE_CHK
check(exists(select * from PUBLICATION
where PUBLICATION.ID_PER = ID_PER));
alter table propose add constraint FKpro_UTI_FK
foreign key (email)
......@@ -199,10 +194,6 @@ alter table PUBLICATION add constraint FKou_est_un_FK
foreign key (ID_PER)
references PERIODIQUE;
alter table PUBLICATION add constraint FKou_est_un_CHK
check((ID_PER not null)
or (ID_PER is null));
alter table PUBLICATION add constraint FKou_encore_est_un_FK
foreign key (ID_RAP)
references RAPPORT;
......@@ -211,13 +202,9 @@ alter table PUBLICATION add constraint FKest_un_FK
foreign key (ISBN)
references LIVRE;
alter table RAPPORT add constraint ID_RAPPORT_CHK
check(exists(select * from PUBLICATION
where PUBLICATION.ID_RAP = ID_RAP));
alter table RAPPORT add constraint ID_RAPPORT_CHK
check(exists(select * from redige_par
where redige_par.ID_RAP = ID_RAP));
alter table redige_par add constraint FKred_RAP
foreign key (ID_RAP)
......@@ -315,7 +302,7 @@ create unique index ID_RAPPORT_IND
on RAPPORT (ID_RAP);
create unique index ID_redige_par_IND
on redige_par (id, nom);
on redige_par (ID_RAP, nom);
create index FKred_Aut_IND
on redige_par (nom);
......
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment