[UPHPU] Dual ID numbers

Ray Hunter bigdog at venticon.com
Tue Jun 7 12:17:09 MDT 2005

John David Anderson wrote:
>> 1. composer table (auto-incremented composer_id)
>> 2. cd relation table (cd_id)
>> 3. composer_cd join table (incremented cd_id with composer_id)
> Or..
> 1. Composer table (auto-inc. composer_id)
> 2. CD table (auto-inc. cd_id, with foreign key that points to 
> composer_id, and optional CD# attribute)
> This allows each CD and composer to have a unique identifier,  allowing
> you to display a CD# however you want...

if i were doing the db design i would do this:

1. composer table (autoinc composer_id)
2. cd table (autoinc cd_id)
3. join table (composer_id, cd_id)

then if you have composers on other cds you are covered. this will also
allow you to stay in bcnf (3rd normal) form which is a good thing
depending on how your cd and composer tables are setup. then you can
sort the cds based on release date to give you the numbering schema that
you are looking for (cd1, cd2, etc).


More information about the UPHPU mailing list