Theatre Management System (Oracle Database)
Theatre Management System (Oracle Database)
Theatre Management System (Oracle Database)
CC5051NA Database
Introduction ..................................................................................................................... 1
Business Rules/Policies ............................................................................................................ 1
Table of Tables
Introduction
Located on the centre of Pokhara, Bindhyawasini Theatre Hall is the oldest theatre
hall in Pokhara. It is located just 2.2 km away from Bus Park (Prithivi Chowk) which
will take approximately 7 minutes if we travel in public bus. It was established on
2060 B.S with the aim to provide a better experience while watching various shows.
Currently, this theatre hall can accommodate 2000 people at once.
Started as a theatre hall to premiere Nepali shows, now this hall shows English,
Hindi and Nepali movies according to market demand and what is trending.
Business Rules/Policies
Since man problems might occur operating a business daily, this theatre hall also
has certain business rules/policies that their employee/customer follow as a whole.
These rules are:
1. All the information we keep might be used for statistics analysing.
2. We might send promotional materials to your phone/email/mailing address.
3. You aren’t allowed to resale our show tickets on high price. If found, you will
be fined twice the amount you sold it for.
4. You are required to show the booking receipt/show ticket before entering the
hall.
5. You should show your show tickets if any of our staff ask for it.
6. If you lost your booking receipt, you can get a copy for 10% of the price. So,
we encourage you to keep the receipt safe.
7. You won’t be allowed to enter theatre hall if you arrive more than 30 minutes
late for the show.
8. Recording show is prohibited. If found, you will be jailed under the existing
National Constitution.
9. Abuse of illegal drugs, drinking and smoking is prohibited. If found, you will be
handed over to local authorities.
10. We won’t be responsible if your possessions/vehicles are damaged/lost within
our premises.
Saugat Timilsina 1
CC5051NA Databases
1. Database Design
Database Design is a collection of processes that facilitate the designing,
development, implementation and maintenance of enterprise data management
systems. The main objectives of database designing are to produce logical and
physical designs models of the proposed database system.
Saugat Timilsina 2
CC5051NA Databases
1.3. Normalization
UNF
Employee(Employee_Name, Employee_Address, Employee_MailingAddress,
Employee_PhoneNumber, Employee_Fax, Employee_Age, Employee_Sex,
Employee_Type, Employee_Email, {Show_Name, Show_Duration, Show_Price,
Show_Place, has_meal, meal_type, has_accomodation, Ticket_IssuedOn,
Ticket_Price, Customer_Name, Customer_Address, Customer_MailingAddress,
Customer_Fax, Customer_Age, Customer_Sex, Customer_Type,
Saugat Timilsina 3
CC5051NA Databases
1NF
Employee(Employee_Id, Employee_Name, Employee_Address,
Employee_MailingAddress, Employee_PhoneNumber, Employee_Age,
Employee_Fax, Employee_Sex, Employee_Type, Employee_Email)
2NF
Employee(Employee_Id, Employee_Name, Employee_Address,
Employee_MailingAddress, Employee_PhoneNumber, Employee_Age,
Employee_Fax, Employee_Sex, Employee_Type, Employee_Email)
3NF
Employee(Employee_Id, Employee_Name, Employee_Address,
Employee_MailingAddress, Employee_PhoneNumber, Employee_Age,
Employee_Fax, Employee_Sex, Employee_Type, Employee_Email)
Saugat Timilsina 4
CC5051NA Databases
Saugat Timilsina 5
CC5051NA Databases
Saugat Timilsina 6
CC5051NA Databases
2. Database Implementation
Entity: Customer
Attribute Name Data type Length Constraint Description
Customer_Id Number Primary Key Unique
Auto-increment identification of
task
Ticket_Id Number Foreign Key Id of the ticket
Not Null customer
bought.
Customer_Name Varchar 25 Not null Name of the
customer
Customer_Address Varchar 200 List of
addresses of
the customer
Customer_MailingAddress Varchar 40 Not null Mailing
address of the
customer
Customer_Fax Varchar 25 Fax number of
the customer
Customer_Age Number Not Null Age of the
Customer
Customer_Sex Varchar 10 Not null Sex of the
Customer
Customer_Type Varchar 15 Not null Type of
customer (Old/
New)
Customer_Mobile Varchar 25 Mobile number
of the customer
Customer_Email Varchar 150 List of E-mail
addresses of
Saugat Timilsina 7
CC5051NA Databases
the customer
Is_Employee Varchar 5 To determine if
the customer is
employee
Is_User Varchar 5 To determine if
the customer is
user of the
system.
Table 1: Data dictionary of Customer entity
Entity: Show
Saugat Timilsina 8
CC5051NA Databases
service
Table 2: Data dictionary of Show entity
Entity: Employee
Saugat Timilsina 9
CC5051NA Databases
Entity: Ticket
Entity: Book
Attribute Name Data type Length Constraint Description
Book_Id Number Primary Key Unique
Auto-increment identification of
Booking
Customer_Id Number Foreign key Id of the
Not Null customer who
booked.
Ticket_Id Number Foreign Key Ticket Id which
Not Null has been
booked.
Booken_On Date Not Null Date when the
ticket is booked
Booked_For Date Not Null Date when the
ticket is booked
for
Table 5: Data dictionary of Book entity
Saugat Timilsina 10
CC5051NA Databases
Query Executed:
Saugat Timilsina 11
CC5051NA Databases
);
Query Executed:
Saugat Timilsina 12
CC5051NA Databases
Query Executed:
Saugat Timilsina 13
CC5051NA Databases
Query Executed:
Saugat Timilsina 14
CC5051NA Databases
Query Executed:
Saugat Timilsina 15
CC5051NA Databases
Query Executed:
Saugat Timilsina 16
CC5051NA Databases
Query Executed:
Saugat Timilsina 17
CC5051NA Databases
INSERT INTO Show values(Show_sq.nextval, 'Ways of life', 120, 'B block', 'No', '',
'Yes');
INSERT INTO Show values(Show_sq.nextval, 'Aliens', 90, 'E block', 'No', '', 'No');
INSERT INTO Show values(Show_sq.nextval, 'Space', 90, 'D block', 'No', '', 'NO');
INSERT INTO Show values(Show_sq.nextval, 'Mahabharat', 270, 'A block', 'yes',
'lunch', 'Yes');
Query Executed:
Saugat Timilsina 18
CC5051NA Databases
Query Executed:
INSERT INTO Customer values(Customer_sq.nextVal, 1, 'Rohit Bhandari', 'Nepal
Karnali Gaau besi 2', 'Nepal Gandaki Dulegauda Kawase 6', 5123523, 25, 'Male',
'Old', '9585366235', 'rohit@rm.com', 'yes', 'yes');
Saugat Timilsina 19
CC5051NA Databases
Query Executed:
INSERT INTO Book values(Book_sq.nextval, 1, 1, '1/Nov/2018', '11/Dec/2018');
INSERT INTO Book values(Book_sq.nextval, 2, 2, '1/Nov/2018', '11/Dec/2018');
INSERT INTO Book values(Book_sq.nextval, 3, 3, '1/Nov/2018', '11/Dec/2018');
INSERT INTO Book values(Book_sq.nextval, 4, 4, '16/Nov/2018', '11/Dec/2018');
INSERT INTO Book values(Book_sq.nextval, 5, 5, '17/Nov/2018', '17/Dec/2018');
INSERT INTO Book values(Book_sq.nextval, 6, 6, '18/Nov/2018', '11/Dec/2018');
Saugat Timilsina 20
CC5051NA Databases
Executed Query:
Saugat Timilsina 21
CC5051NA Databases
Executed Query:
Executed Query:
Saugat Timilsina 22
CC5051NA Databases
Executed Query:
Saugat Timilsina 23
CC5051NA Databases
Figure 17: Listing Users who attended show and had lunch
Executed Query:
Figure 18: Listing Shows that will have breakfast at given place and date
Saugat Timilsina 24
CC5051NA Databases
Executed Query:
Figure 19: Listing Employees who worked as user or have attended the show
Executed Query:
Saugat Timilsina 25
CC5051NA Databases
Figure 20: Listing Customers that booked show starting later or on a given date
Executed Query:
Saugat Timilsina 26
CC5051NA Databases
3. Critical Evaluation
This task was assigned to us as a coursework for our database module with 50%
weightage for the final result with the aim of giving us a detailed knowledge on
how to work in a real-world scenario. In this Coursework, we were to make
theatre operator system database which could save all the details needed in a
theatre. While doing this coursework I made ERDs, Data dictionary as per the
need of coursework and to make my development work easier too. I used
Draw.io (online software for making diagrams) to make ERDs, Microsoft Word for
Data dictionary and report writing. I also used Oracle’s SQL Developer for writing
and executing SQL queries.
Saugat Timilsina 27
CC5051NA Databases
Saugat Timilsina 28