CHECK(nom is NOT NULL and prenom is NOT NULL and email is NOT NULL and login is NOT NULL and motdepasse is NOT NULL and numeroTel is NOT NULL and blackliste is NOT NULL)
CHECK(email is UNIQUE)
Contributeur(#nom: string, #prenom: string, #dateDeNaissance: date ,nationalite: string)
CHECK(titre is NOT NULL and dateSortie is NOT NULL and genre is NOT NULL and langue is NOT NULL and ETAT is NOT NULL)
CHECK( (typeDoc = Film and duree is NOT NULL and synopsis is NOT NULL) OR (typeDoc = Musique and duree is NOT NULL and editeur is NOT NULL) OR (TypeDoc = Livre and ISBN is not NULL and resume is not NULL and editeur is NOT NULL))
Adherent: Attributs non nuls sauf nombre de sanction, login, email et numero uniques
Contributeur: Attributs non nul, multi value
Personnel: Attributs non nul, mail et numero unique
Docu: Attributs non nuls sauf ceux spécifiques au classe fille: resume, Synopsis, ISBN, resume, duree etc .Un Etat à la fois. ISBN est unique.
Cependant, selon le type du document (Attribut typeDoc) certains sont obligatoires, par exemple un film doit forcément avoir une durée.
EmpruntDocument: Attributs non nul sauf date de retour et etat de retour. Le nombre d'emprunt ne peut exceder le maximum fixe.
La date d'emprunt doit être inferieur à la date de retour effective et la date limite.
Le couple (code,dateEmprunt) et (code,dateRetour) est unique (Un document ne peut avoir été emprunté 2 fois en même temps)
Aucune ligne ne doit réferer à un document qui est perdu à l'état d'emprunt
ContributionDocument: TypeC non nul, TypeDoc non nul.
Etat: type enumere {Bon, abime, neuf, perdu} un seul etat possible à la fois, non nul
Sanction: Attributs non nuls.
\ No newline at end of file
CHECK(typeC is not NULL and TypeDoc is not NULL)
CHECK( (TypeDoc = Livre and (typeC = auteur or typeC = editeur)) or (TypeDoc = Film and (TypeC = realisateur or TypeC = acteur)) or (TypeDoc = Musique and (TypeC = chanteur or TypeC = compositeur or TypeDoc = editeur)))