Guest User

Untitled

a guest
Dec 10th, 2019
90
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE TABLE Branch(
  2. Id char(8) PRIMARY KEY,
  3. Name varchar(40),
  4. NrEmp INT
  5. )
  6. CREATE TABLE Inventory(
  7. BookId char(8),
  8. BranchId char(8)
  9. )
  10. CREATE TABLE Publisher(
  11. Code char(8) PRIMARY KEY,
  12. Name varchar(40),
  13. Location varchar(40)
  14. )
  15. CREATE TABLE Author(
  16. Id char(8) PRIMARY KEY,
  17. FirstName varchar(40)
  18. )
  19. CREATE TABLE Wrote(
  20. BookId char(8),
  21. AuthorId char(8)
  22. )
  23. CREATE TABLE Book(
  24. Code char(8) PRIMARY KEY,
  25. Name varchar(40),
  26. Title varchar(40),
  27. Price int,
  28. Type varchar(10),
  29. Paperback char(3) CHECK (Paperback IN ('Yes','No')),
  30. Years varchar(4),
  31. Units char(5)
  32. )
  33. CREATE TABLE PublishBook(
  34. IdPublisher char(8),
  35. IdBook char(8)
  36. )
RAW Paste Data