How many rooms must be referenced?

A facilities database contains exactly 12 rows in Room and exactly 8 rows in Asset. RoomID is Room's primary key, and AssetID is Asset's primary key. Asset.RoomID is a foreign key referencing Room.RoomID.


Consider four independent designs for Asset.RoomID:

  • Required, sharing allowed: every asset contains an existing RoomID, and several assets may reference the same room.
  • Optional, sharing allowed: an asset may contain NULL instead of a RoomID, and several assets may reference the same room.
  • Required, sharing prohibited: every asset contains an existing RoomID, and no two assets may reference the same room.
  • Optional, sharing prohibited: an asset may contain NULL, but no two assets with a RoomID may reference the same room.

Here, NULL does not reference any room. No other constraints apply. For each design, enter the minimum and maximum possible numbers of distinct Room rows referenced by the 8 assets. Give exact integers.

DesignMinimum referenced roomsMaximum referenced rooms
Required, sharing allowed
Optional, sharing allowed
Required, sharing prohibited
Optional, sharing prohibited

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Relational Database Structures Questions: