1

Before starting to develop anything, I made a draft of a ER diagram using Chen's notation, when developing the web page I had to change some stuff on the database, and at the end I got this ER diagram:

enter image description here

Between "booking" and "staff" tables I have a relational table "assign". But between "booking" and "parts" I have this "cost" which I believe its the relational one, but I dont know how to represent it on Chen's notation diagram. Can someone give me a help? :)

Thanks.

Christophe
  • 68,716
  • 7
  • 72
  • 138

1 Answers1

1

In this physical ERD diagram, which shows how primary and foreign keys are used to implement the relationships.

From the conceptual point of view:

  • assign implements a many-to-many relation between staff and booking;
  • cost implements a many-to-many relation between booking and part that provides additional information about the combination between booking and parts.

In Chen's notation:

  • assign would be represented with a simple losange for relationship and a cardinality M, N.
  • cost would also be representad with a many-to-many relationship losange. But in addition, you'd show the relationship's attributes (e.g. quantity, cost, description) as additional ellipses connected to the relationship

You could also consider to use associative entities instead of realationships, especially for cost. It has the advantage of suggesting that there's a table behind. But it's not required in your model, unless cost could have relationships with other tables (which would be easy since there's a cost_id)

Christophe
  • 68,716
  • 7
  • 72
  • 138