Advertisement
Guest User

Untitled

a guest
May 30th, 2017
588
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.08 KB | None | 0 0
  1. ----- Movie -----
  2. create or replace type Movie_type as object (
  3. movieID number(8,0),
  4. movieTitle varchar2(45),
  5. synopsis varchar2(45),
  6. director varchar2(45),
  7. mainCast varchar2(45),
  8. movieTime varchar2(45),
  9. releaseDate varchar2(45),
  10. movieLanguage varchar2(45),
  11. subtitle varchar2(45),
  12. genre varchar2(45),
  13. classification varchar2(45),
  14. picture varchar2(45),
  15. clip varchar2(45),
  16. price decimal(4,2));
  17.  
  18. create table Movie_table of Movie_type ;
  19.  
  20. Alter table Movie_table
  21. Add (constraint movie_pk primary key(movieID));
  22.  
  23. ----- Insert into Movie -----
  24. INSERT INTO Movie_table VALUES
  25. (001,'Napoleon Dyanite','About some kid','Brandon Kemp','Some guy','10:00','13th of May,2010','English','German','Comedy','M','HD','Clip',10.00);
  26.  
  27. INSERT INTO Movie_table VALUES
  28. (002,'House of flying daggers','ninjas, essentially','Xing Xao','Chow yung fat','12:00','14th of May,2010','Japanese','English','action','M','HD','Clip',15.00)
  29.  
  30. INSERT INTO Movie_table VALUES
  31. (003,'James Bond','Some spy does stuff','Greg','Pierce Brosnon','7:00','15th of may,2010','English','N/A','Action','M','HD','Clip',20.00)
  32.  
  33. ----- Show -----
  34. create or replace type Show_type as object(
  35. showID int,
  36. startShow date,
  37. endShow date,
  38. price decimal(4,2),
  39. avilableSeats int);
  40.  
  41. create table Show_table of Show_type;
  42.  
  43. Alter table Show_table
  44. Add (constraint show_pk primary key(showID));
  45.  
  46. ----- Insert into Show -----
  47. INSERT INTO Show_table VALUES
  48. (001,'10-May-2010','20-May-2010',10.00,100);
  49.  
  50. INSERT INTO Show_table VALUES
  51. (002,'10-May-2010','20-May-2010',20.00,200);
  52.  
  53. INSERT INTO Show_table VALUES
  54. (003,'10-May-2010','20-May-2010',30.00,300);
  55.  
  56.  
  57. ----- Reservation -----
  58. create or replace type Reservation_type as object(
  59. reservationID int,
  60. reservationDate date,
  61. payment varchar2(10),
  62. noOfTickets int);
  63.  
  64. create table Reservation_table of Reservation_type;
  65.  
  66. Alter table Reservation_table
  67. Add (constraint reservation_pk primary key(reservationID));
  68.  
  69. ----- Insert into Reservation -----
  70. INSERT INTO Reservation_table VALUES
  71. (001,'15-May-2010','Cash',2);
  72.  
  73. INSERT INTO Reservation_table VALUES
  74. (002,'17-May-2010','COD',5);
  75.  
  76. INSERT INTO Reservation_table VALUES
  77. (003,'18-May-2010','COD',8);
  78.  
  79.  
  80. ----- Customer -----
  81. create or replace type Customer_type as object(
  82. customerID int,
  83. customerName varchar2(45),
  84. customerEmail varchar2(45));
  85.  
  86. create table Customer_table of Customer_type;
  87.  
  88. Alter table Customer_table
  89. Add (constraint customer_pk primary key (customerID));
  90.  
  91. ----- Insert into Customer -----
  92. insert into Customer_table values
  93. (001, 'Brandon Kemp', 'kempy92@gmail.com');
  94.  
  95. insert into Customer_table values
  96. (002, 'Sam Greenwood', 'sam@dragoon.me');
  97.  
  98. insert into Customer_table values
  99. (003, 'Jesus Christ', 'Be_Back_In_3@tomb.com');
  100.  
  101. ----- Member -----
  102. create or replace type Member_type as object(
  103. memberID int,
  104. firstName varchar2(45),
  105. lastName varchar2(45),
  106. email varchar2(45),
  107. street varchar2(45),
  108. suburb varchar2(45),
  109. state varchar2 (45),
  110. postCode varchar2(45),
  111. dob date,
  112. gender char,
  113. memberpassword varchar2(10));
  114.  
  115. create table Member_table of Member_type;
  116.  
  117. Alter table Member_table
  118. Add (constraint member_pk primary key (memberID));
  119.  
  120. ----- Insert into Member -----
  121. insert into Member_table values
  122. (001, 'Brandon', 'Kemp', 'kempy92@gmail.com', '1 fake street',
  123. 'Glenelg North', 'SA', '5045', '31-August-1992', 'M', 'password');
  124.  
  125. insert into Member_table values
  126. (002, 'Sam', 'Greenwood', 'sam@dragoon.me', '2 fake street',
  127. 'Grange', 'SA', '5096', '1-September-1931', 'M', 'password');
  128.  
  129. insert into Member_table values
  130. (003, 'God', 'Almighty', 'god@hotmail.com', '1 Heaven Lane',
  131. 'Heaven', 'SA', '1001', '12-August-1313', 'F', 'password');
  132.  
  133. ----- Person-----
  134. create or replace type Person_type as object(
  135. personID int,
  136. personEmail varchar2(45));
  137.  
  138. create table Person_table of Person_type;
  139.  
  140. Alter table Person_table
  141. Add (constraint person_pk primary key (personID));
  142.  
  143. ----- Insert into Person -----
  144. insert into Person_table values
  145. (001, 'kempy92@gmail.com');
  146.  
  147. insert into Person_table values
  148. (002, 'sam@dragoon.me');
  149.  
  150. insert into Person_table values
  151. (003, 'god@hotmail.com');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement