Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3 Building a Database for Hogwarts (30 Points] In Harry Potter's School of Wizardry, Hogwarts, fortune-telling is a hot business attracting many witches and wizards.

image text in transcribed

3 Building a Database for Hogwarts (30 Points] In Harry Potter's School of Wizardry, Hogwarts, fortune-telling is a hot business attracting many witches and wizards. A fortune-telling center wishes to maintain information about their customers. However, the center has realized the shortcomings of witchery and their dire need for Databases. Therefore, they have invited a database expert (you!) to fly to Hogwarts to design their database given the following description. The center employs a number of fortune-tellers. Each fortune-teller has an ID, first name, last name, hourly rate, and method used (e.g. tarot, astrology etc.). A magician (witch/wizard) can schedule a session with a specific fortune-teller on a specific date and for any desired duration. Of course, a fortune teller can see as many magicians as possible in a day. Most importantly, the predictions made during a session for a magician, including love, wealth, career, and luck are stored for reference. This ensures that this information is available when making predictions in later sessions for the same magician. 6pts (a) Draw the E.R. diagram for the fortune-telling database as described above. Make sure to indicate primary and partial keys, cardinality constraints, weak entities, and participation constraints where applicable. Please state any assumptions you make. 12pts (b) Write SQL statements to create tables corresponding to your E.R. diagram. Make sure to indicate primary keys, and foreign keys (if any). Do not specify on delete clauses or check constraints. 12pts (c) When a magician arrives for a session, the fortune-teller must see the history of predictions which were made for that magician in the past. Write a view to achieve this task

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions