Hi all,
I'm hoping somebody here might be able to point me in the right
direction.
Basically, I'm looking for a "good" way to build tables such that
different kinds of stuff can grouped.
For example, let's say I have "rooms" and they can contain "people"
and/or "books" and/or "furniture" -- each of those objects (rooms,
people, books, furniture, etc) may have their own attributes -- but the
idea is that a room may contain 0 or more of each of the others.
I'll need to do lots of selects to retrieve the contents of specific
rooms.
Is there a standard / good way to go about this sort of thing?
Somehow giving people, books, furniture a room_ID (foreign key) seems a
bit clumbsy -- ie, do I have to run a select for each?
thanks kindly, -Scott
I'm hoping somebody here might be able to point me in the right
direction.
Basically, I'm looking for a "good" way to build tables such that
different kinds of stuff can grouped.
For example, let's say I have "rooms" and they can contain "people"
and/or "books" and/or "furniture" -- each of those objects (rooms,
people, books, furniture, etc) may have their own attributes -- but the
idea is that a room may contain 0 or more of each of the others.
I'll need to do lots of selects to retrieve the contents of specific
rooms.
Is there a standard / good way to go about this sort of thing?
Somehow giving people, books, furniture a room_ID (foreign key) seems a
bit clumbsy -- ie, do I have to run a select for each?
thanks kindly, -Scott
Comment