DATA MODELING FOR BUSINESS REQUIREMENTS

Jacob_s
5 min readNov 29, 2017

--

This blog will give you a basic idea about data modeling for business requirements .Data modeling is the process of documenting a complex software system design as an easily understood diagram, using text and symbols to represent the way data needs to flow. The diagram can be used as a blueprint for the construction of new software or for re-engineering a legacy application.

Traditionally, data models have been built during the analysis and design phases of a project to ensure that the requirements for a new application are fully understood. A data model can be thought of as a flowchart that illustrates the relationships between data. Although capturing all the possible relationships in a data model can be very time-intensive, it’s an important step that shouldn’t be rushed.

Let’s take an example -Scenario :

Let’s take a Builder who wants to build a huge mall .He builds the mall with really good architecture but there is a lot of traffic jam outside the mall . This is because they failed to create a entry and exit for the mall. From this we learn that sometime in the big picture we tend to forget the small details . That is where data modeling comes into the picture

It’s important to build a blue print of a data model or the data architect which is given to the developers or the users ad the data warehouse is made.

It is not one step process , but it is a gradual step by step process with the understanding of the various requirement .For any business requirement there will be multiple parameters and we will be dealing with multiple real world subjects that are related to each other .

ER(Entity Relationship) Diagram :

This is where the ER diagram comes into the scene ,which helps us find relations between various different subjects. After the requirement gathering is done by the data modeller by understanding the business problem , the data modeller will develop models using the ER diagram(the components that are required and how they are related) for other the client and the developers .Thus once the ER digram is build this is then given to the developer to build the data ware house

Business requirements — data model — -data developer — — data warehouse .

Entity

example :teacher and student

The entity is teacher and student.

Relationship : teacher teaches the student .Cardinality — is relationship between two entities

Relationship

One to one : One instance of an entity s linked to one instance of another entity .

Example :

Relationship : one to many.

one instance of an entity A is linked to many instance of another entity B but one instance of B s linked with single instance of entity A.

Example :

Relationship : many to many.

one instance of an entity A is linked to many instance of another entity B and one instance of B is linked with many instance of entity A.

TYPES OF MODEL :

Well-documented conceptual, logical and physical data models allow stake-holders to identify errors and make changes before any programming code has been written.

Data modelers often use multiple models to view the same data and ensure that all processes, entities, relationships and data flows have been identified. There are several different approaches to data modeling, including:

Conceptual Data Modeling

Physical Data Modeling

Logical Data Modeling

CONCEPTUAL DATA MODEL:

In this model we first understand the business problem and then the next step is carried out by collecting business requirements This model is something that Business users can understand easily .Once the modeller and client agree then you move to making the logical model and this model does not have technical details .

Example : Conceptual model for supermarket who want to measure the sales figure .

what the super market tore wants to measure ?

Sales figure

Various dimensions associated with the sales ?

measure sales per product , per dimensions and per date

LOGICAL DATA MODEL

Extension of the conceptual model that includes relationships and entities which describes data in more details . each entity will have attributes defined primary key for each entity will be defined and the foreign key linking the different entity will be defined. Tables can also be normalised n this model .

PHYSICAL DATA MODEL

Physical model represents how the model will be built in the database .This is a representation of your physical data model. When you move from logical to physical model Entities will become tables , attributes will become column names , data types for each columns will be specified along with precision and scale, primary key and foreign keys will be specified , column constraints will be specified .

The physical data model will be different for different databases. data type might be different for db2 and oracle databases.Defining the correct data type is important , as it might result in using extra space in the data base memory which could cost more .The physical model helps developers write SQL statements and great the objects .Tables and their relationships are then created using these statement.Taking a look at the diagram below . We can see the diagram contains certain extra characteristics like data type , column constrains. The store dimensions has a NOT NULL column called Store_name. The store dimension has a view created on it .There may be other variations of certain data types like CHAR, VARCHAR etc. This is dependent on the DBMS system that the business is using.

COMPARING THE MODELS:

This blog will conclude now after introducing the various concepts in data modeling .

--

--

Jacob_s

Data science/engineer @Deloitte Anaytics and AI. Twitter : @jacob_stallone8 LinkedIn : https://www.linkedin.com/in/jacob-stallone-ba4b26149/