principleMinor
Physical vs Logical data independence
Viewed 0 times
physicalindependencedatalogical
Problem
I am new to information systems and was working on a homework. I am not sure of the difference between physical and logical data independence. What is meant by physical and what is meant by logical ?
I keep thinking of physical as like a harddrive or something but its not. Is it more like a data structure ? So what is logical ?
I keep thinking of physical as like a harddrive or something but its not. Is it more like a data structure ? So what is logical ?
Solution
Logical data is how your applications see the data, and how they query data.
In the case of a relational database, the design of tables, along with their columns and relationships, is the logical model. In other database models the logical level could be queues, collections, or any type of data structure used by applications.
But how are those data structures written to disks (and to memory)? That is the physical layer. It is the set of files written to disk to contain data, and the format used to represent data in such files.
So what is the independence between physical and logical layers? It is the principle that states that programs which query a database don't need to know how it stores data physically. For example, an SQL query mentions table and columns, not files and bytes from that file.
In the case of a relational database, the design of tables, along with their columns and relationships, is the logical model. In other database models the logical level could be queues, collections, or any type of data structure used by applications.
But how are those data structures written to disks (and to memory)? That is the physical layer. It is the set of files written to disk to contain data, and the format used to represent data in such files.
So what is the independence between physical and logical layers? It is the principle that states that programs which query a database don't need to know how it stores data physically. For example, an SQL query mentions table and columns, not files and bytes from that file.
Context
StackExchange Database Administrators Q#199652, answer score: 5
Revisions (0)
No revisions yet.