difference between z

Difference between Logical and Physical Database Model

Difference between Logical and Physical Database Model

When designing a database, it is important to choose the right model. There are two main types of models: the logical model and the physical model. The logical model is used to represent the data in a way that is easy to understand by humans. The physical model is used to map out how the data will be stored on disk. In this blog post, we will discuss the difference between these two models and provide examples.

What is a Logical Database Model?

  • A logical database model is a data model that covers the logical structure of a database. It is concerned with how data are related to one another and how they are organized. The most common type of logical database model is the relational model, which arranges data into tables. Other types of logical database models include the hierarchical model and the network model. The relational model is the most widely used type of logical database model. It arranges data into tables, which are connected by relationships.
  • Tables are made up of rows (records) and columns (fields). Each row contains information about a single entity, such as a customer or an order. Each column contains a single piece of information, such as a customer name or an order date. Relationships allow you to connect data in different tables. For example, you might have a customer table and an orders table. The two tables would be related by a customer ID field. This would allow you to see all of the orders for each customer. The hierarchical model arranges data into a tree-like structure.
  • Each record has only one parent record, but may have multiple child records. Records at the same level are called siblings. For example, you might have an employees table with fields for employee ID, employee name, and manager ID. The manager ID field would be used to relate each employee to their manager. The network model is similar to the hierarchical model, but allows records to have more than one parent record. This allows for more flexibility in modelling data relationships. However, it can also make queries more complex.

What is Physical Database Model?

Physical database models are a type of data model that is used to design relational databases. Physical database models show the relationship between data and how it is stored in the database. Physical database models also show the relationships between the tables in the database. Physical database models are different from logical database models because they show how the data is actually stored in the database. Physical database models are also different from conceptual database models because they show how the data is actually used in the database. Physical database models are used to design relational databases because they show the relationship between data and how it is stored in the database.

Difference between Logical and Physical Database Model

  • When it comes to databases, there are two main types of models: logical and physical. As their names imply, the logical model focuses on the logical structure of the data, while the physical model focuses on the physical structure of the data.
  • The logical model is concerned with how the data is organized and how it can be accessed. This model is independent of any specific database management system (DBMS), which means that it can be used with any DBMS. In contrast, the physical model is tailored to a specific DBMS and includes information about how the data is actually stored in that particular DBMS.
  • Both models are important in database design. The logical model provides a high-level view of the data that can be used to generate reports and query data. The physical model provides a low-level view of the data that can be used to optimize performance and ensure data integrity.

Conclusion

The logical database model organizes data by its meaning, while the physical database model stores it on disk. In a logical database, you can query the data in any order you want because the system understands what each field means. A physical database is limited to the way the data is stored on disk, so you can only query it in the order that it’s physically laid out. This difference is important when designing and using databases.

Share this post

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn
Share on email
Email