Now we certainly know why the database is required to store the data. But do we exactly know how the data is actually stored in database? Of Couse not! To get to heck of the architecture of the Database here is the layered structure:-
The above structure shows how data is actually stored.
Physical Level: At this level the data looks in an very unfamiliar form i.e. in the form of zeroes on ones. This level signifies the actual storage of the data on the hard disk. The data here looks very untidy and unrelated. So it is very difficult to understand is it a Database -_- ! ?? Or is it an image?? OMG I'm screwed. And here comes our guardian angel Logical level.
Logical Level: So that we can actually understand the data logical level relates the whole bunch of data. Well at this level we can actually understand what the data is about. Its actually pretty much the whole database in a nutshell. But wait!! Database is actually a multiuser system! So do you want to show whole of the data to every user that user the database?? I'm sure you won't like that to happen.
View Level: At this level the user can actually visualise data in any form he likes. For example a table or do you remember JARVIS from the Ironman movie, you can get the data in the form of voice or image or anything. It is an important thing to be noted that each user have his own view based on the permission given to the user.
What is independence? Am I talking about 1947?? Yeah pretty much the same thing but in a different way. Independence in Database refers to the independence between the levels of database. For example, the data stored in one of the level of the database should not depend on other upper level like the physical storage of data should not depend on how the data is related to each other.
Physical- Logical Independence: This is simply the independence between the physical and the logical level of the database.
View- Logical Independence: This is the independence between the view and logical level of data. For example, we have a whole bunch of the data stored, if anything changes in the database structure then this should not reflect in the view level of any user.
Abstraction is the hiding of data between the layers. Each layer in unable to see the lower layer of the database.
Logical-Physical Abstraction: At the logical level how the data is stored in the physical level is invisible this is the abstaction between the logical and physical level of database.
View-Logical Abstraction: At the view level whole data of the database is invisible to the current user. This abstraction is necessary for security purposes. Thus this is the abstraction between the view and logical level of the Database.