alter table ACHAT add constraint FKprovient_d_un_FK
foreign key (ID_EXE)
references EXEMPLAIRE;
alter table autorise_l_acces add constraint FKaut_UTI
foreign key (email -- Compound attribute --)
references UTILISATEUR;
alter table autorise_l_acces add constraint FKaut_LAB_FK
foreign key (nom)
references LABORATOIRE;
alter table EXEMPLAIRE add constraint FKpossede_FK
foreign key (nom)
references LABORATOIRE;
alter table EXEMPLAIRE add constraint FKemprunte_FK
foreign key (email -- Compound attribute --)
references UTILISATEUR;
alter table EXEMPLAIRE add constraint FKcomporte_FK
foreign key (ID_PUB)
references PUBLICATION;
alter table interesse_par add constraint FKint_UTI_FK
foreign key (email -- Compound attribute --)
references UTILISATEUR;
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.numero = numero and PUBLICATION.editeur = editeur and PUBLICATION.edition = edition and PUBLICATION.annee_de_publication = annee_de_publication));
alter table propose add constraint FKpro_UTI_FK
foreign key (email -- Compound attribute --)
references UTILISATEUR;
alter table propose add constraint FKpro_PUB_FK
foreign key (ID_PUB)
references PUBLICATION;
alter table PUBLICATION add constraint FKou_est_un_FK