What is Data Modeling
In simple terms, Data Modeling refers to building a data model which can be stored in some database. The data model is a conceptual representation of an association between different data objects.
Understanding Data Modeling / Scope
It occurs at three different layers:
- Physical model: It is a schema which says how data is stored physically in the database
- Conceptual model: It is the user view of the data i.e. the high level which the user sees.
- Logical model: It sits between the Physical model and conceptual model and it represents the data logically, separate from its physical stores.
Hierarchical Data Modeling: These models were used to replace file-based systems. The data was kept in a tree like one too many arrangements.
Relational Data Modeling: It’s true that the hierarchical model helped us to move from file-based systems which reduced complexity but still one had known the specific physical data storage employed. The relational database follows the relational model where data is stored in tables, unlike Hierarchical database where it is stored in a tree-like structure. In short, it reduced the complexity more when compared to the hierarchical model.
How does data modeling make work so easy/why should we use it?
It helps us in a visual representation of data and enforces business logic, regulations, policies, etc on data. It is a guide which is used by scientists and analysts in the designing and implementation of a database. So, without data modeling the job of analysts and scientists to implement the business requirements on database becomes difficult.
Why do we need Data Modeling? / What can you do with it?
The main goal of using it is:
- To ensure that all data objects are represented correctly as if it is not done correctly we would get incorrect results.
- It helps as stated earlier to design database at conceptual, physical and logical levels.
- It helps to design the relational tables, primary keys, foreign keys, etc.
- Database developers can create a better physical database with a good model as it becomes a guiding tool for them.
- It helps to identify missing and redundant data.
- It helps us to have a better IT infrastructure and to have easy and cheap maintenance when required in the long run though it’s time-consuming initially.
Working with Data Modeling
Now let’s create a sample data model to understand how to work with a model. To do this we have to follow certain steps:
- First we have to understand the requirements, In this case, we will create a model for an online store. So, keeping that in mind we need two tables a) customers b) products
- Next step is to get the attributes of the tables or entities
a. customer table can have attributes like:
b. Product table can have attributes like:
In the customer table, we can have Id as Primary key and similarly Product Id in Product table will be the primary key as shown in the below diagrams.
Now, we will design the relationship between these two tables. So to connect the customer and product table we will create a table called purchase which will be like an order table (i.e. which customer ordered which product).
If you look in the figure above the customer-purchase reference is OK because every purchase has one customer and one customer has many purchases. So, this reference is okay. One more thing we have taken user_account_id as a foreign key (the reference to the id in customer key). Similarly product_id. There is still a problem with product-purchase reference as several products can be bought in one purchase as well several purchases can include the same product.
To overcome this we will design an intermediary table known as purchase_item which will be connected with purchase and product. In the below figure we can see the problem resolved.
There are various advantages are as follow:
- It helps business to communicate, plan across their organization.
- It helps to recognize the correct source of data which can be used to populate the model.
- This can be used to define relationships between different tables like primary key, foreign key, etc.
Who is the right audience for learning this technology?
It is very essential. The right audiences for learning modeling techniques are individuals who are data architects and data analysts. Most individuals start as data analysts and then move up the ladder.
How this technology will help you in career growth?
According to Glassdoor, the average salary in the market for modelers is projected to earn about $78,601 on an average. So you can see that it is a well-paid job. Most big companies invest in modelers as they are very essential for keeping the integrity of data.
In conclusion, we can say that the model created by modelers ensure consistency in naming conventions, integrity, and security of data. because good data will enable the business in the correct efficient utilization of their data.
This has been a guide to What is Data Modeling. Here we discussed the definition, career growth, skills, advantages and Working of Data Modeling with the help of examples. You can also go through our other suggested articles to learn more –