Advertisement
Guest User

Untitled

a guest
Apr 27th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. drop table if exists Utilisateur, Message, SectionN, Sujet, Moderateur, IgnoreN;
  2.  
  3. create table Utilisateur(
  4. login text primary key,
  5. mot_De_Passe text,
  6. email text,
  7. idIgnore text references Utilisateur(login)
  8. );
  9.  
  10. create table SectionN(
  11. nom text,
  12. idSection int primary key
  13. );
  14.  
  15. create table Sujet(
  16. titre text,
  17. idSujet int primary key,
  18. idSection int references SectionN
  19. );
  20.  
  21. create table Message(
  22. dateN date,
  23. contenu text,
  24. titre text,
  25. idMessage int primary key,
  26. idSujet int references Sujet,
  27. login text references utilisateur
  28. );
  29.  
  30. create table Moderateur(
  31. login text references Utilisateur,
  32. idSection int references SectionN(idSection),
  33. primary key(login,idSection)
  34. );
  35.  
  36. create table IgnoreN(
  37. ignorant text references Utilisateur(login),
  38. ignoré text references Utilisateur(login),
  39. primary key(ignorant, ignoré)
  40. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement