Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2009
    Posts
    1

    Question about database table design

    Hello all,

    So, I am designing a website that will attempt catalog rosters of performing members of musical ensembles as well as what instruments they played and the years they played them.

    So far, I know I will need tables as such:
    • Person
    • Instrument
    • Performing Ensemble
    • Season


    I guess my dilemma is what sort of joining tables need to exist between the various elements. A few example records would be as follows:

    Billy Bob played Drums for Music Group A in 2008
    John also played drums for Music Group A in 2008
    John played guitar for Music Group B in 2009.

    They website will need to be searchable based on those elements. Any suggestions would be much appreciated.

    Thanks in advance!

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    you need at least 4 tables

    3 of them for persons, instruments, ensembles

    1 for the "who played what, where, and when" facts, exactly like your examples, except using FKs to link to the PKs of the 3 main tables, and possibly a FK to the seaon PK, unless all you have for the season is the year, in which case a season table is prolly not needed
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •