Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Polymorphism in RDBMS

Polymorphism in RDBMS

From: Ian Pilcher <i.pilcher_at_comcast.net>
Date: Fri, 23 Apr 2004 15:57:32 GMT
Message-ID: <I1bic.8543$YP5.716358@attbi_s02>


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 - 10:57:32 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US