Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Rest in Peace (RIP) is a hotel management company with 'unique' properties. RIP maintains a database to track their properties, rooms, bookings, and employees. Assuming

Rest in Peace (RIP) is a hotel management company with 'unique' properties. RIP maintains a database to track their properties, rooms, bookings, and employees. Assuming you have entities for:

PROPERTY - one row per property (hotel, lodge, inn, etc)

ROOM - one row per room within a property

EMPLOYEE - one row per employee working for RIP, Inc.

1. Using the above entities, describe a 1:M relationship and a M:N relationship. How about a 1:1 relationship? For this item, describe the relationships in terms of business rules. Remember that business rules should describe both sides of the relationship and should be able to be used to directly create the ERD. For example, suppose you have a CUSTOMER entity and an ORDER entity. A business rule might be:

A CUSTOMER may have zero or more ORDERs. A specific ORDER is for one and only one CUSTOMER.

From this example business rule we know that CUSTOMER:ORDER is 1:M. (The second sentence makes the '1' side.) We also know that ORDER is optional to CUSTOMER and thus would have a O on the ORDER side when drawing the Crow's foot. Since CUSTOMER is mandatory to ORDER we would see the | on the CUSTOMER side of the Crow's foot.

An example of a many to many relationship and the associated business rule: A STUDENT may enroll in one or more CLASS_SECTIONs. A (specific) CLASS_SECTION may have zero or more STUDENTs enrolled in it.

From this we know that STUDENT:CLASS_SECTION is M:N. Without understanding both sides of the business rule we wouldn't know for sure if it were 1:M or M:N.

2. Create an ERD using the relationships described in 1. Use Crow's foot notation for this.

3. If you were to covert the model as described in 2 to a set of tables and their relationships (i.e. a relational schema), what would the attributes for each of the entities be?

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

Step: 3

blur-text-image

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 1 Lnai 9284

Authors: Annalisa Appice ,Pedro Pereira Rodrigues ,Vitor Santos Costa ,Carlos Soares ,Joao Gama ,Alipio Jorge

1st Edition

3319235273, 978-3319235271

More Books

Students also viewed these Databases questions

Question

What tools might be helpful?

Answered: 1 week ago