Reputation: 8903
I was going through some tutorials and came across the below database diagram:
I didn't understand this database diagram. Can anyone help me in understanding these notations? Are they made using UML or Visio or what?
Upvotes: 2
Views: 2027
Reputation: 1666
This notation is a format commonly used for relational databases modelling called Crow's foot notation.
Usually related to the Entity-relationship model, it became popular in the relational databases world thanks to Oracle via the Barker's notation.
For this historical reason, multiple tools support notations related to the Entity-relationship model such as MySQL Workbench or MS Visio.
Your screenshot seems to come from MySQL Workbench. If you compare it with the linked screenshot I provide, you might note several differences in the symbols. This is because the direct meaning of such symbols is rather variable, not standardized as in a language such as UML. The circle position is not very strict from one diagram to another, but the triangle shape usually refers to a foreign key.
Upvotes: 1
Reputation: 825
The crows feet (triangle looking thing) indicates a one to many relationship with the other connecting table.
The open circle and the little stripe next to to each other means zero or one relationships
The little stripe means at least one or more relationships
I am assuming it as foreign keys but nowhere does it explicitly states that it is actually.
EDIT: They are not foreign keys as the empty circle and little stripe means there can be a category entry without a department linked to it.
Explanation:
~ Table departments has a one to many relationship with categories. One department can have multiple categories entries.
~ department_id is referenced in table categories.
Upvotes: 3