First, to address whether or not shareholding
is an entity or a relationship:
Because shareholding
describes how a subject and an investee company interact, I'm inclined to think it's a relationship. That being said, you may want to define shareholding
between the subjects + records and the investee company very explicitly.
Second, about which schema is correct:
I think to correctly show that shareholding can be describes by zero or more records, 2 and 3 cannot be correct as those have a (1,1)
relationship between the Shareholding
and Record
entities. Personally I would modify Schema 1 to have Shareholding
as a relationship shared by Investee
and Shareholder
, and then have a (0,N)
connection between Shareholding
and Record
directly (if possible). This would show the actual relationship between the two, rather than a middle-man Descriptions
relationship, but may be off on how these things interact in your system, so that's your call on what makes the most sense. :)
I'll also say that I like the (0,N)
between Subject
and Shareholding
in Schema 2.
Third, on if Schema 2 and Schema 3 are equivalent:
Yes, these are equivalent, because you kept the Shareholder
and Investee
relationships consistent in the two. If you'd changed them to entities in Schema 3 the scenario would have been different, but in Schema 3 you pretty much just made it more explicit what Shareholding
is. That being said, Schema 2 is much more clear.
I hope this helps! I'm by no means a master of ERDs and happy to discuss this if you want! :)