- Oct 12, 2004
- 497
- 0
- 76
I'm working on DB software for a music program to help manage their music. I had a DB guy help me with the structural things and everything on the form entry side is gravy. I'm having a problem with reporting and querying in two cases, though.
Here are the affected tables and fields:
Music (for all of the pieces of music)
PK_ID
FK_Composer
FK_Arranger
FK_Style1
FK_Style2
Composers_Arrangers (composers and arrangers, obviously)
PK_ID
First_Name
Last_Name
Styles (for the different styles of music)
PK_ID
Style_Description
Both music.FK_Composer and music.FK_Arranger are related to Composers_Arrangers.PK_ID. Music.FK_Style1 and Music.FK_Style2 are related to Styles.PK_ID. This is necessary because a person could be a composer or arranger (or both) on a piece of music.
The problem comes when trying to generate a report or query to list composer, arranger, style1, and style2 of a piece of music. I can get either the composer or arranger but not both, and I can get style1 or style2 but not both.
I have not yet been able to find a solution to this problem. It's redundant to have separate tables for composers and arrangers and multiple style tables, but that seems to be the obvious, cop-out solution. Any suggestions to make this work?
Here are the affected tables and fields:
Music (for all of the pieces of music)
PK_ID
FK_Composer
FK_Arranger
FK_Style1
FK_Style2
Composers_Arrangers (composers and arrangers, obviously)
PK_ID
First_Name
Last_Name
Styles (for the different styles of music)
PK_ID
Style_Description
Both music.FK_Composer and music.FK_Arranger are related to Composers_Arrangers.PK_ID. Music.FK_Style1 and Music.FK_Style2 are related to Styles.PK_ID. This is necessary because a person could be a composer or arranger (or both) on a piece of music.
The problem comes when trying to generate a report or query to list composer, arranger, style1, and style2 of a piece of music. I can get either the composer or arranger but not both, and I can get style1 or style2 but not both.
I have not yet been able to find a solution to this problem. It's redundant to have separate tables for composers and arrangers and multiple style tables, but that seems to be the obvious, cop-out solution. Any suggestions to make this work?
