In: Computer Science
Distinguish between logical models and physical models. How is each useful?
Logical models & Physical models are used in database designing.
Definitions:
1) Logical Model: Data model gets developed using business requirements and describe the data to great extent. Its base for physical data model. It considers all entities, relationship between them and the attributes of the entities.
2) Physical Model: This data model gets developed on the basis of logical model and helps to implement the database. It includes tables, primary keys, foreign keys and columns. We can make changes in it according to physical requirement.
Difference between Logical model & Physical model are as follows:
Logical Model | Physical Model |
It gets designed using business requirements. | It gets designed based on logical model. |
It does not represent actual database, its skeleton of it. | It represents actual database and its data. |
Defines data elements and their relationships. Includes unique identifier. | Includes primary keys, foreign keys, indices for fast access |
Business analysts design the model. | Database designer or administrator design the model. |
Does not include duplicate or redundant data. | May include duplicate or redundant data. |
It is simpler than physical model. | It is complicated than logical model. |
Summary:
Data model creation at initial stage helps to reduce development time and effectively reduces its cost too. Main difference between them is Logical data models help to define the data elements and their relationships and physical data models help to design the actual database.