ER Diagram Advanced Practices
ER Diagram Advanced Practices
Design an E-R diagram to capture the requirements of an online ticket booking system for the Cinemas in a
league. Here are the requirements of the system:
• The system should show a list of Cinemas as shown in Figure 1.
• After a user selects a cinema, the Cinema name, Photo, Address, Tel, and a List of movies currently shown
in the cinema will be display.
• Figure 2 shows the interface display after a user selects the cinema “The ONE” in Figure 1.
• For each Movie in the movie list, we show the Poster, Movie name, Genre, Opening Date, Class and
Length.
• As an example, in Figure 2, we have the following information for the first movie in the movie
list of cinema “The ONE”.
Poster SPIDER-MAN_NO_WAY_HOME_1.png
Movie name Spider-man: No Way Home
Genre Action / Adventure
Opening Date 2022-12-17
Length 148
• Each Cinema has a number of Houses. The houses in a cinema are numbered with a houseID that is
unique within a cinema.
• Each movie has a number of Show record(s). Each show record has its Daytime, HouseID, Type
(2D/3D/IMAX 3D) and ticket Price.
• As an example in Figure 2, the movie “Spider-man: No Way Home” has the following show
records.
Daytime HouseID Type Price
Wed, Dec 25, 07:50PM 6 3D 190
Wed, Dec 25, 10:10PM 4 2D 110
… … … …
• Users can select a show record of a movie from a drop-down list and click the “Ticketing” button to
display the seating plan of the house showing the movie.
• As an example, if a user chooses the first show record of “Spider-man: No Way Home” and click
“Ticketing”, the system will display the seating plan of House 6 as shown in Figure 3.
2
Question designed by Dr. C.K.Chui ([email protected]) for students in COMP3278 Introduction to Database Management Systems.
COMP3278 Introduction to Database Management Systems
Question specification.
In academic research, findings and outputs are published as papers at
academic conferences. In order to build an efficient academic publication
search engine (like Google scholar), we design a database and store the
following information. Design an E-R diagram to capture the following
requirements.
3
Question designed by Dr. C.K.Chui ([email protected]) for students in COMP3278 Introduction to Database Management Systems.
COMP3278 Introduction to Database Management Systems
Question specification.
The iChat company is designing an e-wallet system. The system hosts the following data:
• The system stores User information.
o Each user record consists of a unique userID, usesr name and account balance.
o The system stores friend information for each user. (E.g., User A is a friend with User B).
• The system stores Merchant information.
o Each merchant record consists of a unique merchantID and a merchant name.
o Each merchant can have zero or many MobileSpots.
o Each mobile spot record consists of a spotID and the location of the spot. SpotID is unique within
the same merchant only.
• User can make Transactions in the system.
o Each transaction record consists of a unique transactionID, date and amount.
o Each transaction record is specialized to either P2P transfer or Payment (but not both).
▪ Each payment transaction must be paid to one mobile spot.
▪ Each P2P transaction must transfer to one user.
• A user can create Red Envelopes.
o Each red envelope record consists of an amount, and an envelopeID which is unique for each user
only.
o Red envelope is received through P2P transfer.
Each red envelope can be received through one
P2P transfer that is transferred to a single recipient
(another user) 1.
Further thinking:
1
WeChat allows the user to assign a lump sum to a red
envelope made up of a group of smaller red envelopes within
it. The 'grouped' red envelope can then be posted to a group
chat and the application randomly assigns the amount in each
envelope to each recipient. How can our ERD be updated to
support the ‘grouped’ red envelope function?
4
Question designed by Dr. C.K.Chui ([email protected]) for students in COMP3278 Introduction to Database Management Systems.