0

I've got a few days left before I need to hand in my relational database and everything's going alright. I have the database itself built but there's one design issue that I just can't figure out.

I need a results table, one that references the Members and the Competitions table but I already have a link table there. I'm pretty sure I've simply managed to mislead myself but hope you guys can help! :)

Since I'm an awkward 2 points away from being able to post an image, an imgur link to the schema itself is located here: https://i.stack.imgur.com/mNr0C.jpg

enter image description here

jarlh
  • 42,561
  • 8
  • 45
  • 63
viKK
  • 15
  • 1
  • 7

1 Answers1

0

Looking at your tables, I think you are looking for either

  1. joining Members-Competitions to Competitions-Prizes, which would give the explicit relationship between the member and the prize that they won in that competition, (This is creating a Members-Competitions-Prizes "link" or relation)

or

  1. adding an attribute to the Members-Competitions relation that would show that members placement in the competition regardless of whether they won a prize. (This is creating a new column in the Members-Competition link/relation)

You choice will depend on what you expect to do with the information.

Kit Z. Fox
  • 644
  • 1
  • 11
  • 24
  • This may sound strange but I learned to use link tables a while ago, and I know when to use them and even how to create a three-way one. However, I struggle with envisioning what the link tables will look like and as a result, knowing where certain elements of data will be placed. Also: If i simply add a column with 'Result' what would the first three rows look like? Could I get it to display the prize, the member having won it, and the competition using a three-way join? – viKK Dec 14 '15 at 14:59
  • Is it possible to use just Members-Competition_Link to show the result of each competitorin the competition? The Members table holds all competitors. Results is meant to hold the results of the competition, such as 1st to 3rd place, is it possible to join them without having a three-way join? – viKK Dec 14 '15 at 15:20