Help needed to design an ER diagram 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.
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.