Advertisement
Guest User

Untitled

a guest
Mar 28th, 2015
218
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 theaters(
  2. name varchar2(50) PRIMARY KEY,
  3. city varchar2(20),
  4. state varchar2(2),
  5. zip number(5),
  6. phone varchar(15)
  7. );
  8.  
  9. CREATE TABLE movies(
  10. title varchar2(20) PRIMARY KEY,
  11. rating DECIMAL(2,1),
  12. length number(4),
  13. releaseDate date,
  14. check (rating >= 0 and rating <= 10),
  15. check (length > 0),
  16. check (releaseDate > '01-JAN-1990')
  17. );
  18.  
  19. CREATE TABLE shownAt(
  20. theaterName varchar(50),
  21. movieTitle varchar(20),
  22. foreign key (theaterName) references Theaters(name)
  23. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement