Entity Based Conceptual Dynamic Model: Database Design

Entity Based Conceptual Dynamic Model: Database Design

What does Entity means?

As Merriam Webster mentioned:

Definition of entity
plural entities
1 a : being, existence; especially : independent, separate, or self-contained existence
b : the existence of a thing as contrasted with its attributes
2 : something that has separate and distinct existence and objective or conceptual reality
3 : an organization (such as a business or governmental unit) that has an identity separate from those of its members

Merriam Webster: Entity

By this definition try to imagine a world made of Entities. As we know:

  • Artificial Neural Network is made of neurons
  • All of humans, animals and plants is made of cells
  • All of thing in this universe that categorized as matter, is made of atoms

Every thing that could be visualized as a thing, it can be defined as small units that I call it Unit or Cell. but when we add independence characteristic to this definition, I call it Entity.

Figure1: Entity Structure

When we think Entity as a unit for all of things, we should design it expandable to make it more scale-able for extending and developing software architecture. As you can see in figure 1 this unit is made of 6 tables:

  • Entity
  • Entity Meta
  • Entity Relation
  • Entity Relation Meta
  • Entity Status
  • Entity Type

Now the question is how to define relation between these Entities?

In this model I prefer to use Entity structure for Joined Entities (Entities Relations).

Figure2: Entity Relation Structure

Entity Relation Structure is made of a single Entity that includes some extra fields (as Foreign Key).

A Joined Table (Relation1 in figure3) for messaging service includes 3 extra fields added to Entity structure.

MessageUser (From)User (To)
Figure3: Entity Relation – Simple Example

The Entity structure of Table Relation, make it easy to take a role like Entity and be able to be joined with another Entity or Joined Table.

Figure4: Entity Relation – Simple Authentication Example

Another Authentication example with more detailed information:

Figure5: Authentication Detailed Example
Figure6: Entity Relation – Simple CRM Example
Figure7: Entity Relation – Complex CRM Example

Leave a Comment