0% found this document useful (0 votes)
38 views1 page

Database Task2 3

The document describes 4 tables in a movie database design: 1) A Movie table with MovieID as the primary key and TicketNum as the foreign key linking to the Ticket table. It stores movie information. 2) A Ticket table with TicketID as the primary key linking to the Movie and Hall tables. It stores ticket details like date and amount. 3) A Hall table with HallNum as the primary key and foreign keys linking to the Ticket and Staff tables. It stores hall details. 4) A Staff table with StaffID as the primary key and a foreign key linking to the Hall table. It stores staff information like name and assigned hall.

Uploaded by

cclez
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views1 page

Database Task2 3

The document describes 4 tables in a movie database design: 1) A Movie table with MovieID as the primary key and TicketNum as the foreign key linking to the Ticket table. It stores movie information. 2) A Ticket table with TicketID as the primary key linking to the Movie and Hall tables. It stores ticket details like date and amount. 3) A Hall table with HallNum as the primary key and foreign keys linking to the Ticket and Staff tables. It stores hall details. 4) A Staff table with StaffID as the primary key and a foreign key linking to the Hall table. It stores staff information like name and assigned hall.

Uploaded by

cclez
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Movie ( MovieID, MovieName, MovieTime TicketNum )

PK FK (links to Ticket table)

Ticket (TickeID, TicketDate MovieTime, MovieID, HallNum)


PK FK (links to Movie table) FK (links to Hall table)

Hall (HallNum, HallClass, TicketID,StaffID)


PK FK (links to Ticket table)
Time(MovieTime, MovieDate, TicketID)
PK FK(Links to Ticket table)
Staff (StaffID, StaffName,, HallNum)
PK FK (links to Hall table)

Explanation

In our database design, there are 4 tables in our database design, movie table, ticket table, room
table and staff table. We use these 4 tables to store necessary information.

In the movie table, there are 3 attributes as above shown. This table is to show information
regarding to the hotel’s customers. We have chosen Movie ID as the primary key and Ticket
Number as the foreign key to link to the Ticket table. It’s to show information about what kind of
type did the customers choose in the cinema. Besides that, we can get the total amount of
customers see the movie.

The existence of the Ticket table is to store business record. In the receipt table, there are 3
attributes. Firstly, Ticket Number has been chosen as the primary key. Date is important to
calculate the daily and monthly turnover while the amount can be used to count the revenue of the
cinema.

The room table is to let the customer know where they need to go and also let cleaning staff
to distribute their cleaning jobs and helps record room availability. In this part, we use Room
number as the primary key, while the other 3 attributes are Room key, Room type, the foreign key
which links to the customer table. Staff ID shows which staff assigned to clean this room and
serve the customer in this room and let staff go to exit there when movie is over.

Finally, it’s the staff table. While the staff ID has been chosen to be the primary key, the other
3 attributes are staff name, job and the foreign key, room number which represent his duty venue.

You might also like