0

I want to design an ER diagram in order to create a database for a small local business. My problem is that the bussiness sells merchandise to persons and businesses both. How can i differentiate businesses from persons in my ER diagram? Should i create different entities for those?

EDIT: Here's my ER diagram so far. I implemented two subclasses to differentiate between business and person. Not sure if this is the best way to go though and i'm also not sure about cardinalities.

enter image description here

0

It depends on the similarities between the two entities in the context of the business logic. If they share all the same attributes (columns) except for the fact one is a business and one is a person you theoretically can store them as the same entity in a table like Customer with just a column to distinguish between the two such as a boolean based field IsBusiness.

But in most cases, developers will find that there are unique attributes to one or the other that they need to store as well, and will normalize into separate tables.

Having more context on exactly what you expect to store, even such an example diagram of what you've thought about so far, may help in providing a more specific and concrete answer.

1
  • thank you for your response. I updated my question with the ER diagram that i've constructed so far. If you have any more insights please let me know,
    – Kos
    Mar 1 at 11:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.