edited by
10,455 views
41 votes
41 votes

Consider the entities 'hotel room', and 'person' with a many to many relationship 'lodging' as shown below:

If we wish to store information about the rent payment to be made by person (s) occupying different hotel rooms, then this information should appear as an attribute of

  1. Person
  2. Hotel Room
  3. Lodging
  4. None of these
edited by

4 Answers

Best answer
57 votes
57 votes
Since it is many to many, rent cannot be an attribute of room or person entities alone. If depending on number of persons sharing a room the rent for each person for the room will be different. Otherwise rent can be attribute of room. hence i go for attribute of Lodging.

Correct Answer: $C$
35 votes
35 votes
Rent must be part of Loging only becuase of the following reasons

1. Person will contain the persoanl detail of customer only

2. Room will contain information related to type of room (e.g. delux, semidelux etc.) and the charges of those rooms

3. But loging will contain the information who is staying room, in which room and how many days he would stay based on this amount to be paid decided so it must be part of it only.
3 votes
3 votes
Rent must be part of Lodging only because of the following reasons

1) Rent is only paid if a person takes a room. If a person not take a room then he can't paid the rent.

2) Rent is only paid if hotel room, is booked. Hotel room on it's own don't paid the rent.

So in these both cases, attributes of entity PERSON and HOTEL ROOM are not take participation in the some of the relationship. That's why i think Rent will go with Lodging.
0 votes
0 votes
In a relation descriptive attribute can be assigned to relationship set or key constraint if any.

As given relation is many to many descriptive attribute can only be assigned to relationship set i.e lodging.
Answer:

Related questions

27 votes
27 votes
5 answers
2
Ishrat Jahan asked Nov 3, 2014
7,216 views
A table has fields $F_1, F_2, F_3, F_4, F_5$ with the following functional dependencies $F_1 \to F_3, F_2\to F_4, (F_1 . F_2) \to F_5$In terms of Normalization, this ...
30 votes
30 votes
5 answers
4
Ishrat Jahan asked Nov 3, 2014
9,231 views
Let $T(n)$ be a function defined by the recurrence$T(n) = 2T(n/2) + \sqrt n$ for $n \geq 2$ and$T(1) = 1$Which of the following statements is TRUE?$T(n) = \Theta(\log n)$...