Professional Documents
Culture Documents
INTERNATIONAL SCHOOL
GROUP 7
Class: Database
INS2080 - INS2080.01
Lecturer: Trần Thị Ngân
Hanoi, ……………………2023
1
Member’s Contribution
Percentage of
Full name ID Assigned Task
contribution
Chapter 1:
Requirement specification:
Abstract
Chapter 1:
Business Narratives: 21%
Vũ Hồng Thúy 22070360
Chapter 3:
Power BI:
References
List of Figure
Chapter 1:
About the organization
Chapter 2:
Build ERD: 21%
Trần Anh Thư 22070675 Create a physical database
based on relational schema and
real data.
Chapter 4:
CONCLUSION
Design Canva
2
Chapter 2:
Relational Schema:
Chapter 2:
Relational Schema:
Write SQL scripts for “Some
Nguyễn Văn real data and SQL scripts 16%
20070941
Khôi Chapter 3:
Questions and solution for
6,7,8,9,10
Design Canva
3
List of Figure
4
Table of Contents
Member’s Contribution ............................................................................................................ 2
List of Figure............................................................................................................................. 4
ABSTRACT ............................................................................................................................... 6
Chapter 1: INTRODUCTION .................................................................................................. 7
1. About the Organization: ...............................................................................................................7
2. ERD: .............................................................................................................................................11
3. Power BI:......................................................................................................................................21
REFERENCES ....................................................................................................................... 25
5
ABSTRACT
This report looks at CGV cinema's online ticket booking service. Although we tried to
incorporate as much as possible, our work only includes the booking service of CGV rather
than its entire operation.
In the first chapter, our team briefly introduced CGV, the organization, and the business
narrative to assist in the ERD and relational schema-building process in the second chapter.
The final chapter includes some valuable solutions for CGV’s business.
6
Chapter 1: INTRODUCTION
1. About the Organization:
CJ CGV is the largest film distributor and cinema operator in Vietnam and one of the top 5
cinema chains in the world. Our mission is to become a role model company for the continuous
development of the film industry in Vietnam.
CJ CGV has created a unique concept of transforming former multiplexes into "Cultureplex,"
where customers enjoy the movies and have access to diverse entertainment experiences. At
CGV, we implement the latest technology, including SCREENX, IMAX, STARIUM, 4DX,
and Dolby Atmos, as well as entirely new and different F&B offerings. All while still providing
the highest quality service by CGV Cinema's staff.
Our CSR-CSV activities, such as the Scriptwriting Contest, CJ Short Film Making Project,
Toto's Film Making Class, CGV ArtHouse, and our sponsorship of significant film events such
as HANIFF and Vietnam Film Festival, aimed at building and enhancing platforms where
talented filmmakers can be identified.
CGV cinemas are also determined to provide movie-going experiences for audiences with
limited access to quality cinema environments through CSV programs such as Smile Moon
and Movie for Everyone.
In addition, CJ CGV Vietnam has a transparent and professional system which ensures fair
conditions for all the business partners. Together with our valued audiences, filmmakers and
business partners, CJ CGV Vietnam will continue our journey toward the prosperous future of
Vietnam's movie industry.
2. Requirement specification:
* Method of Investigating Business Rules: CGV
The investigation into the business rules of CGV encompasses multiple stages and methods to
ensure a comprehensive understanding of how they manage and implement their business. Here
are three methods we employed:
7
- Policy and Regulation Review: Examining the policies and regulations that CGV applies in
managing their business operations.
2.3 Observation:
The observation was conducted at CGV cinemas to understand the transaction process when
customers purchase tickets at the counter. This includes assessing the flexibility and efficiency
of the payment system, queue times, and the interaction between staff and customers. The
observation also aimed to identify commercial activities after customers have purchased tickets,
such as gift shops, additional services, or promotional programs. This provides authentic and
detailed insights into how CGV optimizes the value from each transaction. The data gathered
from these methods will be integrated into the database, contributing to building a
comprehensive and detailed picture of CGV's business processes.
8
3. Business Narratives:
Each CGV cinema customer has a unique Customer_ID. Their Full Name, phone number, birth
date, and all the information related to the customer are also stored. When becoming a member
of CGV cinemas, customers are assigned their own card number. Here are 5 steps for
customers to watch movies at CGV cinemas:
Step 1: Select movies:
Customers will select a movie or movies that they want to see. Available movies will be shown
as posters on the home page.
MOVIES (STT, MovieName, MovieID, Premiere, Durations, Language, Category)
Step 2: Choose the location.
After the first step, the system will display a list of cinema locations currently showing the
selected movie. Information about the cinema hall and the cinema will also be listed.
9
Chapter 2: ANALYZING AND DESIGNING THE DATABASE
1. Cardinality:
1. The relationship between Showtime and Cinema Hall is one to many:
- Each Showtime may occur in multiple Cinema Halls
- Each Cinema Hall corresponds to each Showtime.
2. The relationship between Cinema Hall and Cinema Seat is one to many:
- Each Cinema Hall has multiple seats.
- Each Cinema Seat corresponds to a specific Cinema Hall.
3. The relationship between Showtime and Ticket is one to many:
- Each screening time can have multiple tickets sold.
- Each Ticket corresponds to a specific Showtime.
4. The relationship between Customer and Ticket is one to many:
- Each Customer can purchase one or multiple Ticket.
- Each Ticket can belong to one multiple customers.
5. The relationship between Payment and Payment Method is one to many:
- Each Payment can be made using one payment methods.
- Each Payment Method is for one or multiple Payment
6. The relationship between Movie and Ticket is one to many:
- Each Movie is associated with multiple tickets for admission.
- Each Ticket can watch one Movie.
7. The relationship between Ticket and Payment Method is one to one:
- Each Ticket payment is linked to a specific payment method.
- Each Payment Method is for one Ticket.
8. The relationship between Customer and Payment is one to many:
- Each customer can have multiple payments.
- Each payment is paid by one Customer.
9. The relationship between Location and Cinema Hall is one to many:
- Each location can have multiple cinema halls.
10
- Each Cinema Hall is located in a specific Location.
10. The relationship between Cinema Hall and Ticket is one to many:
2. ERD:
3. Relational Schema:
CUSTOMER (Customer_ID,CustomerName,Phone,MobileCard,RewardPoints,Birthdate,
CustomerType)
PRIMARY KEY (Customer_ID)
PaymentMethod (MethodId,MethodName)
PRIMARY KEY (MethodId)
PAYMENT(PaymentID,PaymentDate,Price,Discount,Total,MethodId,MovieID,CustomerID)
PRIMARY KEY (PaymentID)
FOREIGN KEY (MethodId) REFERENCES PaymentMethod
FOREIGN KEY (MovieID) REFERENCES MOVIES
FOREIGN KEY (CustomerID) REFERENCES CUSTOMER
TICKET (TicketID,CinemahallID,PaymentID,MovieID,ShowtimeID,Cinemaseat_id,
SeatType, MethodID, CustomerID, CustomerType, Price)
12
PRIMARY KEY(TicketID)
FOREIGN KEY (ShowTimeID) REFERENCES SHOWTIME
VALUES
('CM-01','TranAnhThu',0343568866,9992128032141175,8,'2004-04-24','Member'),
('CM-19','NguyenThiDanPhuong',0907888565,9992397513675461,10,'2004-12-27','Member');
VALUES
(1,'DuongCung',1855,'2023-11-17','123minutes','Korean-Vietnamesesubtitles','Mentality'),
(16,'ChiemDoat',3721,'2023-11-24','113minutes','Vietnamese-Englishsubtitles','Suspense,Psychology');
VALUES
VALUES
13
('HVOP05', 'CGV VincomOceanPark 05', 77, 'LC-22');
VALUES
VALUES
VALUES
VALUES
VALUES
('TK01', 'HNCT01', 'PM-01', 4667, 'ST-01', 'CS-01', 'VIP', 'MD-03', 'CM-01', 'Member', 60000),
('TK30', 'HNCT03', 'PM-10', 9787, 'ST-03', 'CS-15', 'VIP', 'MD-01', 'CM-15', 'VIP', 70000);
14
Chapter 3: SOME USEFUL REPORTS AND INFORMATION
Think of at least 10 business questions and use SQL to find their answers to support the
organization's daily business activities. (Discuss these questions with your teacher.) Try using
a wide range of statements such as SELECT FROM WHERE ORDER BY GROUP BY
HAVING, TRIGGER, VIEW, PROCEDURE, TRANSACTION, etc. Use Power BI to prepare
useful reports for this organization if possible.
4. Which payment methods have been used for payments with a total amount exceeding
150000?
5. Create a view displaying the movie title, release date, duration, and genre of all movies.
6. How to do a PROCEDURE to get the total amount a particular customer spent?
7. Create a TRANSACTION when a customer makes a new payment, simultaneously adding
reward points.
8. Retrieve the name of the customer with the highest reward points.
9. Find customers with loyalty points greater than the average.
10. Retrieve movies released between 15/11/2023 and 25/11/2023.
-- Question 2
SELECT
PAYMENT.PaymentID,
15
CUSTOMER.CustomerName,
PAYMENT.PaymentDate,
PAYMENT.Total,
PaymentMethod.MethodId,
PaymentMethod.MethodName,
PAYMENT.CustomerID
FROM
PAYMENT
JOIN
WHERE
PAYMENT.MethodID = 'MD-01';
-- Question 3
SELECT Top 1
MovieID,
MAX(Total) AS Highest_revenue
FROM PAYMENT
GROUP BY MovieID
-- Question 4
16
SELECT
PaymentMethod.MethodId,
PaymentMethod.MethodName,
SUM(PAYMENT.Total) AS TotalAmount
FROM
PAYMENT
JOIN
GROUP BY
PaymentMethod.MethodId, PaymentMethod.MethodName
HAVING
-- Question 5
CREATE VIEW MovieDetailsView as
SELECT
MovieName,
Premiere,
Durations,
Category
FROM
MOVIES;
17
-- Question 6
----- Create PROCEDURE
@inputCustomerID VARCHAR(255),
AS
BEGIN
SELECT
@totalSpending = SUM(P.Total)
FROM
PAYMENT P
WHERE
P.CustomerID = @inputCustomerID;
END;
18
-- Question 7
----- Start a transaction
BEGIN TRANSACTION;
UPDATE CUSTOMER
COMMIT;
-- Question 8
19
SELECT
CustomerID,
CustomerName,
RewardPoints,
CustomerType
FROM CUSTOMER
-- Question 9
SELECT CustomerName,
CustomerID,
RewardPoints,
CustomerType
FROM CUSTOMER
-- Question 10
SELECT * FROM MOVIES WHERE Premiere >= '2023-11-15' AND Premiere <= '2023-11-25' ORDER BY
Premiere
20
3. Power BI:
- Below are the Power BI visualization results for the question:
21
4. Which payment methods have been used for payments with a total amount exceeding
150000?
8. Retrieve the name of the customer with the highest reward points.
22
10. Retrieve movies released between 15/11/2023 and 25/11/2023.
23
Chapter 4: CONCLUSION
The purpose of this paper is to give a broad overview of the CGV theatres' online booking
process. We admit that there are still discrepancies between our database and the original
database of CGV Cinema, even after making every attempt to reconstruct the theatre's database.
This is because, although we are users of the company, we are still students.
Regarding how our work is organized, we introduce the business, the business narrative, and
the investigation techniques used in this report. The ERD is constructed in the second chapter
using the business narrative as a guide, and the ERD subsequently writes the relational schema.
The SQL scripts that are part of this report are functional and precise. Lastly, we propose a
dozen uses for the database and then provide answers for each one.
To conclude the project, I hereby summarize some of the plus points and also the downsides
of the database built by our group as follows:
1. Advantages of the project to the business:
• Limited Data Types: The mentioned project lacks flexibility in data types; the CGV
Cinemas' system primarily deals with movie-related data, customer information, and
booking details.
24
REFERENCES
1. CGV cinemas, retrieved January 1, 2023, from:
[ https://www.cgv.vn/ ]
25