Polymorphism in RDBMS
Date: Fri, 23 Apr 2004 15:57:32 GMT
Hi all -
I am trying to design a schema for my super-duper, ultimate web-based jukebox. One of the things I want to do is break out of the simplistic artist/album/song hierarchy that is such a poor fit for jazz and classical music.
Since I want to store detailed information on "artists", I obviously need to treat groups (such as Led Zeppelin or the London Symphony Orchestra) differently from individuals. Assume that I have two tables, 'group_info' and 'person_info', which store this information. (Each table has a primary key named 'id'.)
My challenge is to create an 'artist_info' table. Currently, I've come up with:
id | group_id | person_id
where either group_id *OR* person_id must be null.
Any other ideas?
-- ======================================================================== Ian Pilcher i.pilcher_at_comcast.net ========================================================================Received on Fri Apr 23 2004 - 17:57:32 CEST