Advertisement
Guest User

Untitled

a guest
Feb 15th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. CREATE TABLE IF NOT EXISTS `Departements`
  2. (
  3. `code` int PRIMARY KEY,
  4. `nom` char(20) UNIQUE,
  5. `directeur` char(5) NOT NULL
  6. );
  7.  
  8. CREATE TABLE IF NOT EXISTS `Profs` (
  9. `idul` char(5) PRIMARY KEY,
  10. `nom` char(20),
  11. `age` int
  12. );
  13.  
  14. CREATE TABLE IF NOT EXISTS `Affiliations` (
  15. `idul` char(5),
  16. `code` int,
  17. `depuis` date,
  18. CONSTRAINT
  19. FOREIGN KEY (`idul`)
  20. REFERENCES `Profs`(`idul`)
  21. ON DELETE CASCADE,
  22. CONSTRAINT
  23. FOREIGN KEY (`code`)
  24. REFERENCES `Departements`(`code`)
  25. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement