![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I'm having a problem with my database design. I'm creating a nightlife listings site and there are a few tables that rely on FK constraints. The most important is the 'listings' table, which stores events that can be viewed from a calendar. The listing can be of a few types e.g. an event at a night club, a gig, a special event at a bar etc... There are tables that hold data about the place that is hosting the event e.g. there are 'clubs' 'bars' and gigs' tables. So, each listing needs a parent in one of these tables, and that's where I'm getting confused. |
|
If I give each parent a FK in the listing table there will be problems leaving fields blank, and all listings will only have one parent. |
|
I know I could break it up into a separate listings table for each type but I'd like to be able to add types with out having to make a new table each time. |
![]() |
| Thread Tools | |
| Display Modes | |
| |