Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ----- Movie -----
- create or replace type Movie_type as object (
- movieID number(8,0),
- movieTitle varchar2(45),
- synopsis varchar2(45),
- director varchar2(45),
- mainCast varchar2(45),
- movieTime varchar2(45),
- releaseDate varchar2(45),
- movieLanguage varchar2(45),
- subtitle varchar2(45),
- genre varchar2(45),
- classification varchar2(45),
- picture varchar2(45),
- clip varchar2(45),
- price decimal(4,2));
- create table Movie_table of Movie_type ;
- Alter table Movie_table
- Add (constraint movie_pk primary key(movieID));
- ----- Insert into Movie -----
- INSERT INTO Movie_table VALUES
- (001,'Napoleon Dyanite','About some kid','Brandon Kemp','Some guy','10:00','13th of May,2010','English','German','Comedy','M','HD','Clip',10.00);
- INSERT INTO Movie_table VALUES
- (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)
- INSERT INTO Movie_table VALUES
- (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)
- ----- Show -----
- create or replace type Show_type as object(
- showID int,
- startShow date,
- endShow date,
- price decimal(4,2),
- avilableSeats int);
- create table Show_table of Show_type;
- Alter table Show_table
- Add (constraint show_pk primary key(showID));
- ----- Insert into Show -----
- INSERT INTO Show_table VALUES
- (001,'10-May-2010','20-May-2010',10.00,100);
- INSERT INTO Show_table VALUES
- (002,'10-May-2010','20-May-2010',20.00,200);
- INSERT INTO Show_table VALUES
- (003,'10-May-2010','20-May-2010',30.00,300);
- ----- Reservation -----
- create or replace type Reservation_type as object(
- reservationID int,
- reservationDate date,
- payment varchar2(10),
- noOfTickets int);
- create table Reservation_table of Reservation_type;
- Alter table Reservation_table
- Add (constraint reservation_pk primary key(reservationID));
- ----- Insert into Reservation -----
- INSERT INTO Reservation_table VALUES
- (001,'15-May-2010','Cash',2);
- INSERT INTO Reservation_table VALUES
- (002,'17-May-2010','COD',5);
- INSERT INTO Reservation_table VALUES
- (003,'18-May-2010','COD',8);
- ----- Customer -----
- create or replace type Customer_type as object(
- customerID int,
- customerName varchar2(45),
- customerEmail varchar2(45));
- create table Customer_table of Customer_type;
- Alter table Customer_table
- Add (constraint customer_pk primary key (customerID));
- ----- Insert into Customer -----
- insert into Customer_table values
- (001, 'Brandon Kemp', 'kempy92@gmail.com');
- insert into Customer_table values
- (002, 'Sam Greenwood', 'sam@dragoon.me');
- insert into Customer_table values
- (003, 'Jesus Christ', 'Be_Back_In_3@tomb.com');
- ----- Member -----
- create or replace type Member_type as object(
- memberID int,
- firstName varchar2(45),
- lastName varchar2(45),
- email varchar2(45),
- street varchar2(45),
- suburb varchar2(45),
- state varchar2 (45),
- postCode varchar2(45),
- dob date,
- gender char,
- memberpassword varchar2(10));
- create table Member_table of Member_type;
- Alter table Member_table
- Add (constraint member_pk primary key (memberID));
- ----- Insert into Member -----
- insert into Member_table values
- (001, 'Brandon', 'Kemp', 'kempy92@gmail.com', '1 fake street',
- 'Glenelg North', 'SA', '5045', '31-August-1992', 'M', 'password');
- insert into Member_table values
- (002, 'Sam', 'Greenwood', 'sam@dragoon.me', '2 fake street',
- 'Grange', 'SA', '5096', '1-September-1931', 'M', 'password');
- insert into Member_table values
- (003, 'God', 'Almighty', 'god@hotmail.com', '1 Heaven Lane',
- 'Heaven', 'SA', '1001', '12-August-1313', 'F', 'password');
- ----- Person-----
- create or replace type Person_type as object(
- personID int,
- personEmail varchar2(45));
- create table Person_table of Person_type;
- Alter table Person_table
- Add (constraint person_pk primary key (personID));
- ----- Insert into Person -----
- insert into Person_table values
- (001, 'kempy92@gmail.com');
- insert into Person_table values
- (002, 'sam@dragoon.me');
- insert into Person_table values
- (003, 'god@hotmail.com');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement