سؤال

I wanted to know how to represent a relationship between two entities which means "atleast".

Eg- A song must be part of atleast one album.

If "A song can be part of one or more than one album" means a one to many relationship between song and album, then what would the ER diagram for the Eg given above be?

هل كانت مفيدة؟

المحلول

It's represented on an ERD by a double line (called a participation constraint).

If one song can be on many albums, you need a junction table, Like so:

album -+------< album_song >------+- song

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top