0% found this document useful (0 votes)
21 views4 pages

ER Diagram Advanced Practices

asda

Uploaded by

YouTubeATP
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views4 pages

ER Diagram Advanced Practices

asda

Uploaded by

YouTubeATP
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

COMP3278 Introduction to Database Management Systems

COMP3278 Introduction to Database Management Systems

Advanced practice for students with background in E-R Modeling

Case 1. Online ticket booking system.

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.

Figure 1. List of cinemas

Figure 2. Details after clicking into a cinema E.g., The ONE.


1
Question designed by Dr. C.K.Chui ([email protected]) for students in COMP3278 Introduction to Database Management Systems.
COMP3278 Introduction to Database Management Systems

• 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.

Figure 3. Seats of House 6.


• Each Seat within a house has a seat number, which is a combination of a row number represented by a
character, and a column number represented by a number.
• As an example in Figure 3, the seat number of the seat in the bottom left corner is “I,1”, the seat
number of the seat in the top right corner is “A,30”.
• The system keeps track of the Bookings made by Customers. Those seats that are already booked will be
marked as “X”.

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

Case 2. Academic publication database.

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.

• We store the information of researchers.


o Each researcher has a researcherID (unique identifier) and a researcherName.
o Each researcher may publish zero or many papers.
o A researcher can be an institutional researcher or an industrial researcher.
▪ For institutional researchers, we record their researcherTitle (assistant
professor, associate professor, professor, etc.) and the institution they work at.
▪ For industrial researchers, we record the company they work at.

• We store the information of the papers.


o Each paper has a paperID and a paperTitle.
▪ paperID is unique in a conference (the details of conference will be mentioned later), but
not unique in the entire database.
o Each paper is authored by one or multiple researcher(s).
o Each paper has zero or several citation(s), citing other papers.
o Each paper is reviewed by one or several institutional researcher(s).
▪ The report of each review (Each reviewer write a report on each paper that he/she
reviewed) has to be stored in the database.

• We store the information of research areas.


o Each research area has an areaID (unique identifier) and an areaName.
o A research area maybe a sub-research area of another research area.
▪ A research area has zero or several sub-research area(s).
o Each researcher is expert in one or several research area(s).
o Each paper is addressing one or several research area(s).

• We store the information of the conferences.


o Each conference has a conferenceID (unique identifier) and a conferenceName.
o Each conference has a date (day, month, year) on which the conference is held.
o Each paper is published at one conference.
o Each conference focuses on a single research area or a set of research area(s).

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

Case 3. E-Wallet system

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.

You might also like