What is Data Modelling?Why it is necessary?
What is Data Modelling?
Data modelling is the process of creating a data model for the data to be stored in a database. This data model is a conceptual representation of
- Data objects
- The associations between different data objects.
- The rules.
It is a crucial skill for every data scientist, whether you are doing research design or creating a new data store(database/warehouse) for your company. The ability to determine how they should be grouped and related, is what the data modelling is all about. It sets the relationship between data items.
There are two types of data modelling techniques:
- ERP (Entity Relationship Model)
- UML (Unified Modified Language)
Why should we use Data Model?
There are many uses of data model. And they are as follows :
- It ensures that all data objects required by the database are accurately represented.
- It also ensures that there is no missing data in the model as the absence of data will lead to creation of faulty reports and produce incorrect results.
- Data model helps design the database at the conceptual, physical and logical levels.
- Data Model helps to define the relational tables, primary and foreign keys and stored procedures.
- It provides the clear picture of the base data to the developer to create an effective database.
- It also helps to identify the missing data and values.
Types of Data Models
There are 3 different types of data models.
- It defines what the model contains. It’s purpose is to define business concepts and rules.
The three basic elements of Data Model are
- Entity: A real-world thing.
- Attribute: Characteristic of an entity.
- Relationship: Dependency between two associations.
- Customer and Product are two entities. Customer number and name are attributes of the Customer entity
- Product name and price are attributes of product entity
- Sale is the relationship between the customer and product
Characteristics of a Conceptual Data Model:
- It offers wide coverage of business concepts.
- It is specifically developed and designed for a wide business audience.
- The purpose is actual implementation of the database.
A physical Data Model describes the database specific implementation of the data model. It offers an abstraction of the database and helps generate schema. This is because of the richness of meta-data offered by a physical Data Model.
Characteristics of a Physical Data Model:
- Primary and Foreign keys, views, indexes, access profiles, and authorizations, etc. are defined.
- Columns should have exact datatypes, lengths assigned and default values.
- The physical data model describes data need for a single project or application though it may be integrated with other physical data models based on project scope.
- Data Model contains relationships between tables which addresses nature of the relationships.
Advantages of Data Model:
- The main goal of a designing data model is to make certain that data objects offered by the functional team are represented accurately.
- The data model should be detailed enough to be used for building the physical database.
- The information in the data model can be used for defining the relationship between tables, primary and foreign keys, and stored procedures.
- Data Model helps business to communicate the within and across organizations.
- Data model helps to documents data mappings in ETL process
Disadvantages of Data Model:
- To develop Data model one should know physical data stored characteristics.
- There is no set data manipulation language in DBMS.
- Even smaller change made in structure require modification in the entire application.
- It defines how the model should be implemented. It’s purpose is to develop technical map and data structures.
It adds further information to the conceptual data model. It defines the structure of the data elements and set the relationships between them.
At this Data Modelling level, no primary or secondary key is defined. At this Data modelling level, you need to verify and adjust the connector details that were set earlier for relationships.
Characteristics of a Logical Data Model:
- Describes data needs for a single project but could integrate with other logical data models based on the scope of the project.
- Data attributes will have datatypes with exact precisions and length.
- Designed and developed independently from the DBMS.
- Normalization processes to the model is applied typically till 3NF.