Search code examples
databasedatabase-designentity-relationship

How do I add a relationship association in Database ER Modeling


I have a smiple ER Model I created in StarUML.

I have worked out how to set up my multiplicity values between two classes. I was wondering how do I state the relationship(s) between each entity.

For example if you look at the image below: enter image description here

Here I would like to state that students "have" accomodation, and that the accomdation "accomodates" students. How do I do this?

Thanks Peter


Solution

  • You can put a diamond on the line that connects students and accomodation. Diamonds diagram relationashuips. Inside the diamond, you can put "has/accomodates".

    There are other ways to diagram relationships. Many ER modelers don't bother with diamonds when the relationships are binary (involving just two entities). If the relationships are ternary, quaternary, etc., diamonds become critical to keep the diagram from becoming spaghetti.