Search code examples
umlclass-diagramerd

Converting ERD to class diagram


I am given a ERD to be converted to a class diagram for homework question.http://snag.gy/Misqv.jpg
I want to know what is the symbol inside "Receipt" .Is receipt an entity?
Also what is meant by the** circle near the association in entity Item mean?


Solution

  • Circle means that lower bound of the corresponding association end multiplicity is 0 (Product can be associated with 0 or more Items).

    Receipt is a so called association class, a hybrid between association and class. It is used when a link between two objects (in this case Product an Inventory) has some attributes of its own (here probably receipt date, maybe quantity, price, etc). So, it is an entity, a special case of an entity.

    Here is a corresponding UML diagram:

    enter image description here

    Receipt, translated into DB table would have two MANDATORY foreign keys (of Product and Inventory, in addition to its own fields).