party-model

Have you ever been building any app that handled client’s data, was it e-commerce, crm or anything similar, you surely wondered, how to store it in the database.

Most of the time we consider client as Organization or Person, one or the other. Obviously the two are completely different entities in real life, so it wouldn’t be wise to treat them the same. However, speaking of business, we want to treat both entities like a client, no matter if it’s a company or an individual.

So the problem arises, how to design the database efficiently while not having to do checks here and there within our code, to pick what entity we are dealing with this time.

And here comes the Party Model  Continue reading