multiple parents confusion

Hi I'm making a nightlife listings system.

I have a table that stores listings, the type of listing can be either
an event at a night-club event, at a gig or at a bar. So i could just
assign a number to define the type.

But, the listing needs to have a parent of either club, gig or bar.
What's the best way to handle this?

At the moment there are 3 FK-fields that if not set to zero contain the
id of either club bar or gig. It somehow doesn't seem right.


Any ideas?

Cheers TWIOF
TWIOF [ Mo, 04 September 2006 17:41 ] [ ID #1454565 ]

Re: multiple parents confusion

Also, i could make a seperate listings table for each type (bar, club,
gig) but if added a new type I'd have to create a new table each time,
doesn't seem right either.
TWIOF [ Mo, 04 September 2006 18:19 ] [ ID #1454566 ]
Datenbanken » mailing.database.mysql » multiple parents confusion

Vorheriges Thema: How to generate sequence values during query
Nächstes Thema: getchunk problems using mysql 5.0