Recap on ERD - foreign keys/relationships?

benji_styler06

New member
Local time
Today, 14:27
Joined
Mar 20, 2006
Messages
5
Hi,

I did some access work back in college and am now trying to construct a database for which i will use the xml output. Im trying to set up my ERD.

These are the tables i have:

ARTIST, ALBUM, TRACK, RECORD LABEL, GENRE.

The attached file shows my tables set up in access. Im pretty sure it makes sense but need it checking before i start constructing the database and queries etc.

I beleive Album should be many to one artist

Track should be many to one album

Record label should be one to many albums

Many albums to one genre

I know how to add pimary keys but not sure how to add foreign keys and complete the inital structure, showing the above relationships (one-to-many etc).

Any help/advice would be much appriciated,

Cheers

Ben.
 

Attachments

  • bens_ERD.JPG
    bens_ERD.JPG
    21.7 KB · Views: 869
Thaks for your help,

think iv got it now - however my relationship isnt how i intended, please look at the attaced screen shot. Does access determine the right relationships?

This is what i want, the parts in red are the wrong type of relationships and im unsure how to change them?

Album should be many to one artist - correct

Track should be many to one album - correct

Record label should be one to many albums - the diagram shows many record labels to one ablum?

Many albums to one genre - the diagram shows many genres to one album?

Many thanks for helping me with my learning

cheers,

Ben.
 

Attachments

  • bens_ERD_ver2.JPG
    bens_ERD_ver2.JPG
    21.1 KB · Views: 701
thanks for your help, i think iv got it now - see attached.

Iv just set up a query for a form to add a new album.

its all working apart from the "album title". Its not letting me input data is this due to the ERD? The query works for adding artist name, genre and label name. Not sure why ist not working for adding the album title???

also attached is my query.

Many thanks for your help, wouldnt be able to work it out without helping hands :D

cheers,

Ben
 

Attachments

  • bens_ERD_ver3.JPG
    bens_ERD_ver3.JPG
    18.5 KB · Views: 626
  • query.JPG
    query.JPG
    15.7 KB · Views: 589

Users who are viewing this thread

Back
Top Bottom