You are on page 1of 55

Module Code & Module Title

CC5051NA Databases System

Assessment Weightage & Type


50% Individual Coursework

Year and Semester


2018-19 Autumn

Student Name: Pranaya Pradhan


London Met ID: 17030952
College ID: np01cp4a170020
Assignment Due Date: 28th January 2019
Assignment Submission Date: 28th January 2019
Word Count (Where Required): 4806
I confirm that I understand my coursework needs to be submitted online via Google Classroom under the
relevant module page before the deadline in order for my assignment to be accepted and marked. I am fully
aware that late submissions will be treated as non-submission and a marks of zero will be awarded.
Table of Contents
.................................................................................................................................................... 1
Table of Figure ............................................................................................................................ 5
Table of Table ............................................................................................................................. 7
1. Company Introduction ........................................................................................................... 1
1.1. Introduction of the Company .......................................................................................... 1
1.2. Current Business Activities and Operations ................................................................... 2
1.3. Business Rules ................................................................................................................ 2
1.4. Database Design.................................................................................................................. 3
1.4.1. Creation of entities and attributes ............................................................................... 3
1.4.2. Identifying and Including Primary Key and unique key .............................................. 3
1. Data Dictionary of Show Table ............................................................................... 3
2. Data Dictionary of Person Table ............................................................................. 4
3. Data Dictionary of Booking_Ticket Table .............................................................. 6
1.5. Initial Entity Relation Diagram ........................................................................................... 7
2. Part-1 Database Design .......................................................................................................... 8
2.1 Assumption ...................................................................................................................... 8
2.2. Normalization ................................................................................................................. 8
1. Un-normalized Form (UNF) .................................................................................... 8
2. First Normal Form (1NF) ........................................................................................ 9
3. Second Normal Form (2NF) .................................................................................... 9
4. Third Normal Form (3NF) ..................................................................................... 10
2.3. ER Diagram of normalized database ............................................................................ 11
3. Database Implementation..................................................................................................... 12
3.1. Table Generation ........................................................................................................... 12
1. Creation of User ........................................................................................................... 12
2. Grant to User ................................................................................................................ 12
3. Creation of Customer Table ......................................................................................... 12
4. Creation of Employee Table ........................................................................................ 13
5. Creation of Person Table ....................................................................................... 14
6. Creation of Meal Table .......................................................................................... 15
7. Creation of Accomendation Table ......................................................................... 16
8. Creation of Show Table ......................................................................................... 17
9. Creation of Booking Ticket Table ......................................................................... 18
10. Creation of Person Show Booking_ticket Table ................................................... 19
3.2. Populating Database...................................................................................................... 20
1. Inserting values in Customer Table ............................................................................. 20
2. Inserting values in Employee Table ............................................................................. 20
3. Inserting value in Person Table.................................................................................... 20
4. Inserting values in Meal Table ..................................................................................... 21
5. Inserting values in Accomendation Table.................................................................... 21
6. Inserting values in Show Table .................................................................................... 21
7. Inserting values in Booking_TicketTable .................................................................... 21
8. Inserting values in Person Show Booking_Ticket Table ............................................. 22
3.3. Final Table .................................................................................................................... 22
1. Displaying values of Customer Table .......................................................................... 22
2. Displaying value of Employee Table ........................................................................... 22
3. Displaying values of Person Table .............................................................................. 23
4. Displaying values of Meal Table ................................................................................. 35
5. Displaying Table of Accomendation Table ................................................................. 35
6. Displaying values of Show Table ................................................................................ 36
7. Displaying values of Booking_Ticket Table ............................................................... 38
8. Displaying values of Person Show Booking_Ticket Table ......................................... 39
4. Database Query ................................................................................................................ 40
4.1. Information Query ........................................................................................................ 40
4.1.1. List all customers, old and current. ........................................................................ 40
4.1.2. List all customers with all their addresses. ............................................................ 41
4.1.3. For a given usher, find all the shows he/she ushered or will usher and the ........... 42
amount he/she got/will get for ushering the show. .......................................................... 42
4.1.4. List all customers that are also ushers.................................................................... 42
4.2. Transaction Query......................................................................................................... 43
4.2.1. List all ushers that attended a show that had a lunch in a given place. .................. 43
4.2.2. List the shows that will have breakfast at a given place on a given date. .............. 43
4.2.3. List all employees that have worked as an usher or will work as an usher. .......... 44
4.2.4. List all customers booked for a show starting later or on a given date. ................. 44
5. Critical Evaluation ............................................................................................................... 45
5.1. Further discussion on learning experience .................................................................... 45
5.2. Critical assessment of coursework ................................................................................ 46
References ................................................................................................................................ 47
Appendix .................................................................................................................................. 48
Appendix 1 ........................................................................................................................... 48
Appendix 2 ........................................................................................................................... 48
Appendix 3 ........................................................................................................................... 48
Appendix 4 ........................................................................................................................... 48
Table of Figure
Figure 1 Entity Relation Diagram Before Normalization .......................................................... 7
Figure 2 Entity Relation Diagram After Normalization .......................................................... 11
Figure 3 Creation of User ........................................................................................................ 12
Figure 4 Grant to User ............................................................................................................. 12
Figure 5 Creation of Customer table ........................................................................................ 12
Figure 6 Description of Customer Table ................................................................................. 12
Figure 7 Creation of Employee Table ...................................................................................... 13
Figure 8 Description of Employee Table ................................................................................. 13
Figure 9 Creation of Person Table ........................................................................................... 14
Figure 10 Description of Person Table .................................................................................... 14
Figure 11 Creation of Meal Table ............................................................................................ 15
Figure 12 Description of Meal Table ....................................................................................... 15
Figure 13 Creation of Accomendation Table........................................................................... 16
Figure 14 Description of Accomendation Table ...................................................................... 16
Figure 15 Creation Show Table ............................................................................................... 17
Figure 16 Description of Show Table ...................................................................................... 17
Figure 17 Creation of Booking Ticket Table ........................................................................... 18
Figure 18 Description of Booking_Ticket Table ..................................................................... 18
Figure 19 Creation of Person Show Booking -Ticket .............................................................. 19
Figure 20 Description of Person Show Booking-Ticket .......................................................... 19
Figure 21 Inserting values in Customer Table ......................................................................... 20
Figure 22 Inserting values in Employee Table ........................................................................ 20
Figure 23 Inserting values in Person Table.............................................................................. 20
Figure 24 Inserting values in Meal Table ................................................................................ 21
Figure 25 Inserting values in Accomendation Table ............................................................... 21
Figure 26 Inserting values in Show Table ............................................................................... 21
Figure 27 Inserting values in Booking_ticket Table ................................................................ 21
Figure 28 Inserting values in Person Show Booking_Ticket Table ........................................ 22
Figure 29 Displaying value of Customer Table ....................................................................... 22
Figure 30 Displaying values of Employee Table ..................................................................... 22
Figure 31 Displaying values of Person Table 1 ....................................................................... 23
Figure 32 Displaying values of Person Table 2 ....................................................................... 23
Figure 33 Displaying values of Person Table 3 ....................................................................... 24
Figure 34 Displaying values of Person Table 4 ....................................................................... 24
Figure 35 Displaying values of Person Table 5 ....................................................................... 25
Figure 36 Displaying values of Person Table 6 ....................................................................... 25
Figure 37 Displaying values of Person Table 7 ....................................................................... 26
Figure 38 Displaying values of Person Table 8 ....................................................................... 26
Figure 39 Displaying values of Person Table 9 ....................................................................... 27
Figure 40 Displaying values of Person Table10 ...................................................................... 27
Figure 41 Displaying values of Person Table 11 ..................................................................... 28
Figure 42 Displaying values of Person Table 12 ..................................................................... 28
Figure 43 Displaying values of Person Table 13 ..................................................................... 29
Figure 44 Displaying values of Person Table 14 ..................................................................... 29
Figure 45 Displaying values of Person Table 15 ..................................................................... 30
Figure 46 Displaying values of Person Table 16 ..................................................................... 30
Figure 47 Displaying values of Person Table 17 ..................................................................... 31
Figure 48 Displaying values of Person Table 18 ..................................................................... 31
Figure 49 Displaying values of Person Table 19 ..................................................................... 32
Figure 50 Displaying values of Person Table 20 ..................................................................... 32
Figure 51 Displaying values of Person Table 21 ..................................................................... 33
Figure 52 Displaying values of Person Table 22 ..................................................................... 33
Figure 53 Displaying values of Person Table 23 ..................................................................... 34
Figure 54 Displaying values of Person Table 24 ..................................................................... 34
Figure 55 Displaying values of Person Table 25 ..................................................................... 35
Figure 56 Displaying values of Meal Table ............................................................................. 35
Figure 57 Displaying values of Accomendation Table............................................................ 35
Figure 58 Displaying values of Show Table 1 ......................................................................... 36
Figure 59 Displaying values of Show Table 2 ......................................................................... 37
Figure 60 Displaying values of Booking_Ticket Table .......................................................... 38
Figure 61 Displaying values of Person Show Booking_Ticket Table ..................................... 39
Figure 62 List of Old Customers ............................................................................................. 40
Figure 63 List of New Customers ............................................................................................ 40
Figure 64 List of Customer with their addresses ..................................................................... 41
Figure 65 List of usher Ushering the show .............................................................................. 42
Figure 66 List of Customer that are also usher ........................................................................ 42
Figure 67 List of show attended by usher ................................................................................ 43
Figure 68 List of show that has breakfast in given place ......................................................... 43
Figure 69 List of Employee that work as an Usher ................................................................. 44
Figure 70 List of Customer that booked ticket ........................................................................ 44
Figure 71 Appendix 1 .............................................................................................................. 48
Figure 72Appendix 2 ............................................................................................................... 48
Figure 73 Appendix 3 .............................................................................................................. 48
Figure 74 Appendix 4 .............................................................................................................. 48
Table of Table
Table 1 Data Dictionary of show entity ..................................................................................... 3
Table 2 Data Dictionary of person entity................................................................................... 5
Table 3 Data Dictionary of booking_ticket entity ..................................................................... 6
CC5051NA Databases System

1. Company Introduction
1.1. Introduction of the Company
QFX Cinemas is a premier entertainment company which is launch by Quest
Entertainment. It was founded in 2001 A.D. It is top multiplex in Nepal. Quest Entertainment
plans to give greater moving experience to its audiences with QFX. Nakin Uddin, Rajesh
Siddhi, and Bhaskar Dhungana are the founders of the cinema company. (Ktm2day, 2015).
QFX cinemas have nine multiplexes within Nepal. These multiplex are located in different
part of Nepal. Most of the multiplex is located in Kathmandu. QFX Jay Nepal and QFX Kumari
were the first multiplexes of QFX group which is located at Hattisar and KamalPokhari. QFX
Civil is located at Civil Mall, Sundhara. Similarly, QFX Labim Mall, QFX Chhaya Center, etc.
are located at Labim Mall, Pulchowk and Chhaya Center, Thamel. QFX Bageshwori, QFX
Jalma, QFX Cineplex, QFX Birtamod, etc. are located outside Kathmandu valley respectively
(QFX Cinemas, 2019).
Association of theatre
QFX Cinemas is owned and manage by Quest Entertainment. The main aim of the
company is to provide world class services to movies lovers in Nepal. Quest is trying make
QFX as a brand for providing quality services by upgrading its technology, projection from
analog to digital, proper cinema sound system and many more services (QFX Cinemas, 2019).
The following are the services provided by QFX cinemas:
• Online Ticket reservation with the help of websites.
• Digital Projector from Barco are install in the multiple to provide digital projection and
3D technologies.
• Alcons sound system are install in the multiplex for providing quality sound to its
customer.
• Luxurious and Comfortable sofa are install in the multiple for providing better viewing
experience.
• Different scheme are made for those customer who purchase movie tickets online.
• Audience are free to choose seats in tickets counters.

Pranaya Pradhan 17030952 1|Page


28th January 2019
CC5051NA Databases System

1.2. Current Business Activities and Operations


QFX Cinemas is one of the biggest multiplex of Nepal. The Company have been
working very hard to provide quality world class theatre experience to its customer. Customer
can book the film ticket online without visiting in the multiplex. Many offers are made for
customer who book ticket online. Digital Projector and good sound system are install in every
theatre for quality display and sound. Comfortable sofa are install for better view of movie.
Generally, QFX Cinemas host movies of Hollywood, Bollywood as well as Kollywood.

1.3. Business Rules


The following are the business rules of the QFX cinemas:
For employees
• Employees and customer both can work as usher.
• Employees can attend show off working hours.
For customer
• Customers cannot bring food from outside
• Silence/Dim/Turn Off Mobile Phone.
• Turn Off Your Smart Watch!
• Clean Up Your Trash.
• No Talking.
• Cannot save seats for others without booking it
• Do Not Bring Your Toddler At Night
• Return back every used props and utensil of the company

Pranaya Pradhan 17030952 2|Page


28th January 2019
CC5051NA Databases System

1.4. Database Design


1.4.1. Creation of entities and attributes
Entities
▪ Person
▪ Customer
▪ Employee
▪ Show
▪ Booking
▪ Accommodation

1.4.2. Identifying and Including Primary Key and unique key


The following are the data dictionary of entities and attributes including primary and foreign
key:
1. Data Dictionary of Show Table
Entity Attributes Data type Description Key
show show_id INT It gives unique Primary Key
key for every
show.
show_date DATE It gives the date
of show to play.
show_tittle VARCHAR It shows the
(20) tittle of the
show.
show_length VARCHAR It gives the time
(20) to be taken in
the show.
show_time VARCHAR It shows the
(20) time of show.
meal_type VARCHAR It shows the
(20) type of meal.
meal_time VARCHAR It shows the
(20) time to serve
which type of
meal.
meal_price VARCHAR It shows the
(20) price of meal
Table 1 Data Dictionary of show entity

Pranaya Pradhan 17030952 3|Page


28th January 2019
CC5051NA Databases System

2. Data Dictionary of Person Table


Entity Attributes Data type Description Key
Person person_id INT It gives unique Primary Key
key for each
person.
person_name VARCHAR It shows the
(20) name of
person.
country VARCHAR It shows
(20) country name
of person.
province VARCHAR It shows the
(20) province of the
person address.
street VARCHAR It shows the
(20) street address
of person.
street_no INT It shows the
street number
of person
address.
phone_no VARCHAR It shows the
(20) phone number
of person.
fax_no VARCHAR It shows the fax
(20) number of
person.
cell_phone_no VARCHAR It shows the
(20) cell phone
number of
person.
email VARCHAR It shows the
(20) email address
of person.
age INT It shows the
age of person.
sex VARCHAR It shows the
(20) gender of the
person.
date_of_birth DATE It shows the
date of the birth
of person.
customer_enroll_date DATE It shows the
enrol date of
customer.
customer_type VARCHAR It shows the
(20) customer type
of customer.

Pranaya Pradhan 17030952 4|Page


28th January 2019
CC5051NA Databases System

employee_position VARCHAR It shows the


(20) position of
employee.
employee_salary VARCHAR It shows the
(20) salary of
employee.
employee_salary_status VARCHAR It shows the
(20) salary status of
employee if it
is paid or
unpaid.
Table 2 Data Dictionary of person entity

Pranaya Pradhan 17030952 5|Page


28th January 2019
CC5051NA Databases System

3. Data Dictionary of Booking_Ticket Table


Entity Attributes Data type Description Key
booking_ticket booking_ticket_id INT It gives unique Primary Key
id to the booking
ticket is.
booking_date DATE It shows the date
of booking
ticket.
quantity INT It shows the
quantity of
ticket.
ticket_price VARCHAR It shows the
(20) price of ticket.
seat_number VARCHAR It shows the seat
(20) number in the
show.
accomendation_name VARCHAR It shows the
(20) accommodation
name.
Seating_capapcity INT It shows the
number of seat
in the
accommodation.
Table 3 Data Dictionary of booking_ticket entity

Pranaya Pradhan 17030952 6|Page


28th January 2019
CC5051NA Databases System

1.5. Initial Entity Relation Diagram


The following diagram is of entity relation diagram of QFX cinemas before normalization:

Figure 1 Entity Relation Diagram Before Normalization

Pranaya Pradhan 17030952 7|Page


28th January 2019
CC5051NA Databases System

2. Part-1 Database Design


2.1 Assumption
The following are the assumption that were carry out in the coursework:
▪ Person can be either customer or employees and both at a time.
▪ One show has many customers.
▪ One or many employees can work for one show.
▪ Many tickets can be purchase for one and only one show.
▪ Many bookings can be made for one and only one show.
▪ Customer whose enrol date is before 31th December 2018 are assumed to be old
customer and customer whose enrol date is after 31th December 2018 are assumed to
be new customer.
▪ It is also assumed that one usher can ushered three shows a day and will get $200 a
month for ushering the shows
▪ Meals are provided as per time. Meal type include: Breakfast, Lunch and Dinner.

2.2. Normalization
A process of arrange the date into the database. It is a way of breaking down tables to decrease
data redundancy or data repetition and unwanted words like Insertion, Update and Delete
Anamolies. Normalization process to put data into readable form, removing repetitioning data.
The following are the purpose of normalization:
• Reduce Data Repetition
• Removing Unwanted Anamolies like Insert Anamolies, Update Anamolies and
Deletion Anamolies.
(Study Tonight, 2019)
1. Un-normalized Form (UNF)
The rules of Un-normalized form (HN Computing, 2007):
• Identification of main key and its key.
• Identification of attribute with entity.
• Identification of repeating group with attributes.
The following is the un-normalized table of QFX cinemas:
show (show_id, show_date, show_tittle, show_type, show_length, show_time,
show_price, meal_type, meal_time, meal_price, { person_id, person_name, country,
province, city, street, street_no, phone_no, fax_no, cell_phone_no, email, age, sex,
date_of_birth, customer_enroll_date, employee_postition, employee_salary,
employee_salary_status, {booking_ticket_id, booking_date, accomendation_name,
seating_capacity}})

Pranaya Pradhan 17030952 8|Page


28th January 2019
CC5051NA Databases System

2. First Normal Form (1NF)


The rules of First Normal form (HN Computing, 2007):
• Removing the attributes of repeating group to make a new entity.
• Adding attribute to the original key.

The following are the 1NF table of QFX cinemas:


show (show_id, show_date, show_tittle, show_length, show_time, show_price, meal_type,
meal_time, meal_price)
person (person_id, show_id, person_name, country, province, city, street, street_no,
phone_no, fax_no, cell_phone_no, email, age, sex, date_of_birth, customer_enroll_date,
employee_employee_postition, employees_salary, employee_salary_status,)
booking_ticket (booking_ticket_id, booking_date, ticket_price, seat_number
accomendation_name, seating_capacity,)
3. Second Normal Form (2NF)
The rules of Second Normal Form (HN Computing, 2007):
• Tables ae examine with composite key
• Each key is determined with first and second part in non-key attribute.
• Partial Dependency are removes to make a new table.
The following are the 2NF table of QFX cinemas:
Finding Partial dependency in Person:
person_id, show_id =>
person_id => person_name, country, province, city, street, street_no, phone_no, fax_no,
cell_phone_no, email, age, sex, date_of_birth, customer_enroll_date, employee_position,
employees_salary, employee_salary_status
Finding Partial dependency in Ticket:
booking_ticket_id, show_id =>
booking_ticket_id => booking_date, seat_number, ticket_price accomendation_name,
seating_capacity
Created Table:
show (show_id, show_date, show_tittle, show_length, show_time, show_price, meal_type,
meal_time, meal_price)
person_show_ticket (person_id*, show_id*, ticket_id*)
person (person_id, person_name, person_type, country, province, city, street, street_no,
phone_no, fax_no, cell_phone_no, email, age, sex, date_of_birth, customer_enroll_date,
employee_position, employees_salary)

Pranaya Pradhan 17030952 9|Page


28th January 2019
CC5051NA Databases System

booking_ticket (booking_ticket_id, booking_date, seat_number, ticket_price,


accomendation_name, seating_capacity)
4. Third Normal Form (3NF)
The rules of Third Normal Form (HN Computing, 2007):
• Identification of new dependencies within each table.
• Removing dependencies to make a new table.
• One key is made as key of new table which will be Foreign key for original entity.
The following are the 3NF table of QFX cinemas:
Finding transitive dependency on show:
show_id => meal_id => meal_type, meal_name, meal_time, meal_price
show_id => meal_id
meal_id => meal_type, meal_name, meal_time, meal_price
Finding transitive dependency on person:
person_id => customer_id => employees_id
customer_id => customer_enroll_date , customer_type
employees_id => employee_position, employee_salary
Finding transitive dependency on ticket:
booking_ticket => accomendation_id
accomendation_id => accomendation_name, seating_capacity

Created Table:
show (show_id, show_date, show_tittle, show_length, show_time, show_price, meal_id*,
employee_id*, accomendation_id*)
meal (meal_id, meal_type, meal_time, meal_price)
person_show_booking_ticket (person_id*, show_id*, booking_ticket_id*)
person (person_id, person_name, country, province, city, street, street_no, phone_no, fax_no,
cell_phone_no, email, age, sex, date_of_birth, customer_id*, employee_id*)
customer (customer_id, customer_enroll_date)
employee (employee_id, employee_position, employee_salary, employee_salary_status)
booking_ticket (booking_ticket_id, booking_date, seat_number, ticket_price, show_id*,
person_id*)
accomendation (accomendation_id, accomendation_name, seating_capacity)

Pranaya Pradhan 17030952 10 | P a g e


28th January 2019
CC5051NA Databases System

2.3. ER Diagram of normalized database


The following figure shows the ER Diagram of Normalized Database:

Figure 2 Entity Relation Diagram After Normalization

Pranaya Pradhan 17030952 11 | P a g e


28th January 2019
CC5051NA Databases System

3. Database Implementation
3.1. Table Generation
1. Creation of User

Figure 3 Creation of User

The above command in the screenshot creates user name PranayaPradhan and password of the
user is 17030952.
2. Grant to User

Figure 4 Grant to User

The above command in the screenshot gives grants to user PranayaPradhan.


3. Creation of Customer Table

Figure 5 Creation of Customer table

Figure 6 Description of Customer Table

The above command in the screenshot creates a table name Customer. Customer table has
column customer_id which primary key of the table, customer_enroll_date gives the date when
customer gets associate with the Cinema Company. In another screenshot, column with their
data type are described.

Pranaya Pradhan 17030952 12 | P a g e


28th January 2019
CC5051NA Databases System

4. Creation of Employee Table

Figure 7 Creation of Employee Table

Figure 8 Description of Employee Table

The above command in the screenshot creates employee table. Employee Table has column
employee_id which is Primary Key, employee_position which defines the position of
employee, employee_salary which shows the salary of employee and employee_salary_status
which shows whether the salary of employee is paid or unpaid. In another screenshot, column
with their data type are described.

Pranaya Pradhan 17030952 13 | P a g e


28th January 2019
CC5051NA Databases System

5. Creation of Person Table

Figure 9 Creation of Person Table

Figure 10 Description of Person Table

The above command in the screenshot creates person table. Person Table has column person_id
which is the Primary key of the column, person_name, country, city, province, province_no,
street, street_no, phone_no, fax_no, cell_phone_no, email, age, sex, date_of _birth,
customer_id is the foreign key in person table, and employee_id is also the foreign key in the
person table. In another screenshot, column with their data type are described.

Pranaya Pradhan 17030952 14 | P a g e


28th January 2019
CC5051NA Databases System

6. Creation of Meal Table

Figure 11 Creation of Meal Table

Figure 12 Description of Meal Table

The above command in the screenshot creates a meal table. Here meal table has column
meal_id as Primary key, meal_type, meal_time and meal_price in the column. In another
screenshot, column with their data type are described.

Pranaya Pradhan 17030952 15 | P a g e


28th January 2019
CC5051NA Databases System

7. Creation of Accomendation Table

Figure 13 Creation of Accomendation Table

Figure 14 Description of Accomendation Table

The above command in the screenshot creates accomendation table. Accomendation Table has
column accomendation_id which is Primary key, accomendation_name and seating_capacity
in the table respectively. In another screenshot., column with their data type are described.

Pranaya Pradhan 17030952 16 | P a g e


28th January 2019
CC5051NA Databases System

8. Creation of Show Table

Figure 15 Creation Show Table

Figure 16 Description of Show Table

The above command in the screenshot creates show table. Show Table has column show_id
which is Primary Key, show_date, show_tittle, show_length, show_time, show_price , here
meal_id, employee_id and accomendation_id are foreign keys. In another screenshot., column
with their data type are described.

Pranaya Pradhan 17030952 17 | P a g e


28th January 2019
CC5051NA Databases System

9. Creation of Booking Ticket Table

Figure 17 Creation of Booking Ticket Table

Figure 18 Description of Booking_Ticket Table

The above command in the screenshot creates Booking Ticket Table. Booking Ticket Table
has column booking_ticket_id which is Primary Key, booking_date, seat_number, ticket_price,
here show_id and person_id are foreign keys. In another screenshot., column with their data
type are described.

Pranaya Pradhan 17030952 18 | P a g e


28th January 2019
CC5051NA Databases System

10. Creation of Person Show Booking_ticket Table

Figure 19 Creation of Person Show Booking -Ticket

Figure 20 Description of Person Show Booking-Ticket

The above command in the screenshot creates Person Show Booking_ticket. Person Show
Booking_ticket table has column person_id , show_id, booking_ticket_id, these id are foreign
keys. In another screenshot., column with their data type are described.

Pranaya Pradhan 17030952 19 | P a g e


28th January 2019
CC5051NA Databases System

3.2. Populating Database


1. Inserting values in Customer Table

Figure 21 Inserting values in Customer Table

The above command in the screenshot insert data in Customer Table. Here values are inserted
in customer_id and customer_enroll_date columns.
2. Inserting values in Employee Table

Figure 22 Inserting values in Employee Table

The above command in the screenshot insert values in Employee Table. Here values are
inserted in employee_id, employee_position and employee_salary_status columns.
3. Inserting value in Person Table

Figure 23 Inserting values in Person Table

The above command in the screenshot insert values in Person Table. Here values are inserted
in person_id, person_name, country, city, street, street_no, phone_no, fax_no, cell_phone_no,
email_address, age, gender, date_of_birth, employee_id and customer_id columns.

Pranaya Pradhan 17030952 20 | P a g e


28th January 2019
CC5051NA Databases System

4. Inserting values in Meal Table

Figure 24 Inserting values in Meal Table

The above command in the screenshot insert values in Meal Table. Here the values are inserted
in meal_id, meal_type, meal_time and meal_price columns.
5. Inserting values in Accomendation Table

Figure 25 Inserting values in Accomendation Table

The above command in the screenshot insert values in Accomendation Table. Here the values
are inserted in accomendation_id, accomendation_name and seating capacity columns.
6. Inserting values in Show Table

Figure 26 Inserting values in Show Table

The above command in the screenshot insert values in Show Table. Here the values are inserted
in show_id, show_date, show_length, show_time, show_price, meal_id, employee_id and
accomendation_id columns.
7. Inserting values in Booking_TicketTable

Figure 27 Inserting values in Booking_ticket Table

The above command in the screenshot insert values in Booking Table. Here the values are
inserted in booking_ticket_id, booking_date, seat_number, ticket_price, show_id and in
person_id columns.

Pranaya Pradhan 17030952 21 | P a g e


28th January 2019
CC5051NA Databases System

8. Inserting values in Person Show Booking_Ticket Table

Figure 28 Inserting values in Person Show Booking_Ticket Table

The above command in the screenshot insert values in Person Show Booking_Ticket Table.
Here the values are inserted in person _id, show_id and booking_ticket_id columns.

3.3. Final Table


1. Displaying values of Customer Table

Figure 29 Displaying value of Customer Table

2. Displaying value of Employee Table

Figure 30 Displaying values of Employee Table

Pranaya Pradhan 17030952 22 | P a g e


28th January 2019
CC5051NA Databases System

3. Displaying values of Person Table

Figure 31 Displaying values of Person Table 1

Figure 32 Displaying values of Person Table 2

Pranaya Pradhan 17030952 23 | P a g e


28th January 2019
CC5051NA Databases System

Figure 33 Displaying values of Person Table 3

Figure 34 Displaying values of Person Table 4

Pranaya Pradhan 17030952 24 | P a g e


28th January 2019
CC5051NA Databases System

Figure 35 Displaying values of Person Table 5

Figure 36 Displaying values of Person Table 6

Pranaya Pradhan 17030952 25 | P a g e


28th January 2019
CC5051NA Databases System

Figure 37 Displaying values of Person Table 7

Figure 38 Displaying values of Person Table 8

Pranaya Pradhan 17030952 26 | P a g e


28th January 2019
CC5051NA Databases System

Figure 39 Displaying values of Person Table 9

Figure 40 Displaying values of Person Table10

Pranaya Pradhan 17030952 27 | P a g e


28th January 2019
CC5051NA Databases System

Figure 41 Displaying values of Person Table 11

Figure 42 Displaying values of Person Table 12

Pranaya Pradhan 17030952 28 | P a g e


28th January 2019
CC5051NA Databases System

Figure 43 Displaying values of Person Table 13

Figure 44 Displaying values of Person Table 14

Pranaya Pradhan 17030952 29 | P a g e


28th January 2019
CC5051NA Databases System

Figure 45 Displaying values of Person Table 15

Figure 46 Displaying values of Person Table 16

Pranaya Pradhan 17030952 30 | P a g e


28th January 2019
CC5051NA Databases System

Figure 47 Displaying values of Person Table 17

Figure 48 Displaying values of Person Table 18

Pranaya Pradhan 17030952 31 | P a g e


28th January 2019
CC5051NA Databases System

Figure 49 Displaying values of Person Table 19

Figure 50 Displaying values of Person Table 20

Pranaya Pradhan 17030952 32 | P a g e


28th January 2019
CC5051NA Databases System

Figure 51 Displaying values of Person Table 21

Figure 52 Displaying values of Person Table 22

Pranaya Pradhan 17030952 33 | P a g e


28th January 2019
CC5051NA Databases System

Figure 53 Displaying values of Person Table 23

Figure 54 Displaying values of Person Table 24

Pranaya Pradhan 17030952 34 | P a g e


28th January 2019
CC5051NA Databases System

Figure 55 Displaying values of Person Table 25

4. Displaying values of Meal Table

Figure 56 Displaying values of Meal Table

5. Displaying Table of Accomendation Table

Figure 57 Displaying values of Accomendation Table

Pranaya Pradhan 17030952 35 | P a g e


28th January 2019
CC5051NA Databases System

6. Displaying values of Show Table

Figure 58 Displaying values of Show Table 1

Pranaya Pradhan 17030952 36 | P a g e


28th January 2019
CC5051NA Databases System

Figure 59 Displaying values of Show Table 2

Pranaya Pradhan 17030952 37 | P a g e


28th January 2019
CC5051NA Databases System

7. Displaying values of Booking_Ticket Table

Figure 60 Displaying values of Booking_Ticket Table

Pranaya Pradhan 17030952 38 | P a g e


28th January 2019
CC5051NA Databases System

8. Displaying values of Person Show Booking_Ticket Table

Figure 61 Displaying values of Person Show Booking_Ticket Table

Pranaya Pradhan 17030952 39 | P a g e


28th January 2019
CC5051NA Databases System

4. Database Query
4.1. Information Query
4.1.1. List all customers, old and current.

Figure 62 List of Old Customers

Figure 63 List of New Customers

Pranaya Pradhan 17030952 40 | P a g e


28th January 2019
CC5051NA Databases System

4.1.2. List all customers with all their addresses.

Figure 64 List of Customer with their addresses

Pranaya Pradhan 17030952 41 | P a g e


28th January 2019
CC5051NA Databases System

4.1.3. For a given usher, find all the shows he/she ushered or will usher and the
amount he/she got/will get for ushering the show.

Figure 65 List of usher Ushering the show

4.1.4. List all customers that are also ushers.

Figure 66 List of Customer that are also usher

Pranaya Pradhan 17030952 42 | P a g e


28th January 2019
CC5051NA Databases System

4.2. Transaction Query


4.2.1. List all ushers that attended a show that had a lunch in a given place.

Figure 67 List of show attended by usher

4.2.2. List the shows that will have breakfast at a given place on a given date.

Figure 68 List of show that has breakfast in given place

Pranaya Pradhan 17030952 43 | P a g e


28th January 2019
CC5051NA Databases System

4.2.3. List all employees that have worked as an usher or will work as an usher.

Figure 69 List of Employee that work as an Usher

4.2.4. List all customers booked for a show starting later or on a given date.

Figure 70 List of Customer that booked ticket

Pranaya Pradhan 17030952 44 | P a g e


28th January 2019
CC5051NA Databases System

5. Critical Evaluation
5.1. Further discussion on learning experience
The first coursework was provided to us on the end of year 2018, December 20. With
provided proper guidelines I started my coursework ahead for the purposed Theatre Operator
System should be able to keep track of all people. With preparing information queries: Listing
all customers, old and current listing all customers with all their addresses, for a given usher,
find all the shows he/she ushered or will usher and the amount he/she got/will get for ushering
the show and to show list of all customers that are also ushers. And for Transaction Queries:
Able to list all ushers that attended a show that had a lunch in a given place, list the shows that
will have breakfast at a given place on a given date, list all employees that have worked as an
usher or will work as an usher for a show or who have attended or will attend a show, and also
to list all customers booked for a show starting later or on a given date.

Having a new interest towards handling data this module was quite unique than just
coding, many terms identical designing entity relationship diagram, how to normalize data,
how to model it etc. Many tasks were coming to in an introduction. I understood all the hidden
importance of database management system in various ways while doing normalisation from
UNF to 3NF.

Furthermore, analysing and identifying entities, designing E-R Diagram and


developing database system, populating data in Oracle SQL PLUS was educated from this
coursework. Inclusive the learning experience was awesome.

Pranaya Pradhan 17030952 45 | P a g e


28th January 2019
CC5051NA Databases System

5.2. Critical assessment of coursework


Databases are way more adaptable module as for to see in real life scenario. It consists
the potentiality to cover any field in computer IT upbringing. In concern with other modules,
the database module has become highly useful in overcoming difficulties as the detailed
concept on different database related topics were understood from the module. It helped me in
Software Engineering module as the designing of entity relationship diagram, development of
database system were also included in the Software Engineering module. So, it made easier to
analyse the problem scenario in the Software Engineering module as well.

ORACLE has helped many students all over the world understand the queries to be
implied much more in an easier way. Later this semester the module, I learned to produce
multiple databases system for many other operating systems in terms of real life based context.
Unlike operations like analysis and identifying entities and attributes, designing entity
relationship diagram, converting it to relational model and implementing in ORACLE SQL
PLUS. This module originated a huge fortuitous to get hands on ORACLE and implement
different queries. Consequently, technological future consists different opportunity for I to
work as database administrator and database designer in huge company implementing stuffs
educated from this assignment.

At last the given coursework, developed me skills in context of a database system, in


what and how a database system should be created and removing data redundancy by the
process of normalization. This coursework completely makes it clear how database module
relates to any other modules present till now. This will help me in each and every part of my
life in coming days.

Pranaya Pradhan 17030952 46 | P a g e


28th January 2019
CC5051NA Databases System

References
HN Computing, 2007. Creating a Normalised Relational Database Structure. [Online]
Available at: https://www.sqa.org.uk/e-learning/DDFun01CD/page_10.htm
[Accessed 21 January 2019].
Ktm2day, 2015. QFX-Central Cinema opening at Civil Mall Sundhara. [Online]
Available at: https://www.ktm2day.com/2010/09/24/qfx-central-cinema-opening-at-civil-
mall-sundhara/
[Accessed 07 January 2019].
QFX Cinemas, 2019. QFX Cinemas. [Online]
Available at: http://www.qfxcinemas.com/
[Accessed 07 January 2019].
Study Tonight, 2019. Normalization of Database. [Online]
Available at: https://www.studytonight.com/dbms/database-normalization.php
[Accessed 21 January 2019 ].

Pranaya Pradhan 17030952 47 | P a g e


28th January 2019
CC5051NA Databases System

Appendix
Appendix 1

Figure 71 Appendix 1

Appendix 2

Figure 72Appendix 2

Appendix 3

Figure 73 Appendix 3

Appendix 4

Figure 74 Appendix 4

Pranaya Pradhan 17030952 48 | P a g e


28th January 2019

You might also like