Search code examples
databaseentity-relationshipdiagram

Representing multi-valued attribute in MySQL EER-Diagram


I need help with a project for my university programme. The task is to design a database using MySQL and creating ER- and EER-Diagrams for it. The database I want to create is my music library.

My main entities will be Song, Artist, Album and Publisher. Since one Song can have multiple arists, how do I represent that in my design/diagram? My understanding is that that attribute can usually have only a single value.

I hope you can help me with this.


Solution

  • ERD Solution

    So you actually have a many-to-many relationship because a song can be sung by many artist and an artist can sing many songs. Therefore, you need a junction table to represent a many-to-many relationship in an ERD.