diff --git a/BE_SGBD_LIBRARY.ddl b/BE_SGBD_LIBRARY.ddl index 7b2ed0fb66c0e662ffe9d12f49349e3f035c5d53..a918fe93f73742492ba3b716dea952f56a9fe1b6 100644 --- a/BE_SGBD_LIBRARY.ddl +++ b/BE_SGBD_LIBRARY.ddl @@ -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); diff --git a/MOD BD 2022-23 projets.pdf b/MOD BD 2022-23 projets.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f50356093306885fc1dddd8d6b3c6f9b698e7c2a Binary files /dev/null and b/MOD BD 2022-23 projets.pdf differ