Data Independence in DBMS

Data Independence in DBMS: Its Meaning, and Physical and Logical Data Independence with Examples and Importance

What does data independence mean in the database management system (DBMS)?

Data independence is a property of the DBMS that assist you so that you can change your database scheme at that database system level in which you will not require changing the scheme at the other higher level. So actually, data independence assists you so you can separate your data that you want to use from all other programs.

Furthermore, when you store your data then you may use it for any type of computation and presentations. While on the other hand, it is a very basic need for performing many functions for the system

In addition to all this, a database usually contains data and also the data of the user. In other words, you can say that it also stores the metadata means data of the data. So that we can find our data easily. It is not easy t alter or modify the metadata when you have stored it for once but as it is independent of data and as the database management system expands 

then you may alter it so you can meet the requirements

Jeff Bezos Career Advice
Jeff Bezos Career Advice

Metadata is also designated in layers. Hence, when we bring a change in one layer then It will not bring any change In the data of another layer. This is called data independence

What is a database?

A database is a collection of data that may relate and may represent some properties and some aspects. We design ay database system so that we may collect our data within it and we built it so that it may perform our specific tasks and functions. We always design databases so that we may store our specific data and we may get specific tasks from that data and we may retrieve it anytime while considering some appropriate measures of security.

What is DBMS?

DBMS is a database management system and basically, it is a type of software that helps you to manage and store your data. This means DBMS is designed for storage, for retrieving, modifying, defining, and for managing our data.

DBMS basically, is an interface between the database and the user while on the other side, manages our data, scheme, and engine of the database so that it may assist us in easily manipulating, interpreting, managing, and organizing our data.

There are many properties of the DBMS and they vary diversely and the main purpose of this software is:

  • A user can easily access the catalog which may describe metadata
  • Some management system in the DBMS library
  • One of the most prominent features is the data independence and easily abstraction of data
  • Security of the data
  • We can audit or log in to our activity
  • Much reliability in the transactions
  • Reliability in the concurrency
  • We can authorize our access
  • We can access remote locations
  • When there is any damage we can recover our data
  • We can enforce some constraints so that we may have a guarantee that data is following mandatory rules

We design any database scheme so that we may use this technique for increasing our concept, and clarity and functions to organize our data properly. It may also call as the normalization in the database schema. But if we see normalization about the DBMS then, it means that we have to change or have to bring some modifications in some already existing schemes so that we may reduce so interferences and may reduce the data dependency by breaking the larger size tables into the smaller tables and we may define a relation between these tables and hence it may make the process smooth.

On the other hand, when we see the output of DBMS then it allows its user to represent their data of information, we may receive or send a message from the subprograms, some other services, blocks of PL, or SQL and trigger. A file called the DBMS file 

Of  transfer package, was designated by Oracle, it allows us to copy our file while residing in our database and we may also send these files between databases and we may receive it from another database.

Database management system works by using the commands of the system firstly and then, in DBMS from the administrator if the database it receives instructions and that’s how this database management system works and the system functions according to the instructions and then it may reload the data that existed already in the system, it may modify the data in the system or it may retrieve the data in the system. There are some examples of very famous DBMS that may include, NoSQL in DBMS, CDBMS that is a columnar database management system, IMDBMS that is in-memory database management systems and there are some other cloud-based data management systems.

Before considering data independence, there are some database levels

There are some levels of database and these types of data independence operated on these levels

Database levels

There are three levels of the database in which physical and logical independence operated

  • External level
  • Conceptual level
  • Physical can be called as internal level

So before we start the levels, let us suppose the university database and there will be different levels and there will be implemented as following this picture.

External layer

This level is of high level from the other two levels of the architecture and as you can see that they are also closer to the user end. Hence we can also call it the view level. But if we see then, basically, external level represent those type of data from the database that has relevancy to it and it shows the data in the form of view while it does not show a user the other data and hide it from the user. So in this way, when every user has different requirements from the database then it shows every user the information that will be their requirements. So we can see the data that will be only relevant to our requirements.

 In view 1, info about the course will be put

In view 2: info about the student 

Conceptual layer/schema

This level has high level than the physical layer and is of low level than the external layer. We may call it the logical level. As the name of this layer indicating that it will elaborate the data to the user conceptual wise and it will also elaborate the relation that will be between many tables of the data. And it does not depend on that how much data have been stored in the database. 

Info of: student, courses, enrolled

Physical layer/schema

This level is lower than the other two levels in the architecture. We may also call it the internal layer that is opposite to the external layer and also is of lower level while external if of the highest level. This level elaborates and defines that in the database how all the data have been stored. In this lower level, the data that is stored will be in the form of bits and it will be stored in the hard drives that are external and it can be some high level than the physical or internal level. But at some high level, it may be store in some folder r in some files. While some techniques are discussed under the physical level and they are compression and encryption techniques.

You store the relations without giving them any order

On the first column of the index, you put indexes

So as we have seen the system of the database is designed in multilayers. On the other hand, if any database system is not designed multi-layered then it is very challenging to have done change in that database system. And automatically this may help in data independence.

 There are two main types of data independence in a database management system that is following:

Types of Data Independence

The two types are

  • Physical data independence
  • Logical data independence

Physical data independence

So if we see physical data independence then it assists you to separate your conceptual levels from your physical level or your internal level. In this you, without defining the physical structures, you can elaborate your logical description of your database. Moreover, you can easily achieve physical data independence as compared to the logical database.

Furthermore, with this type of data independence, you may alter the physical storage devices or physical storage structures while with the effect on the conceptual scheme.

If you have altered or have performed any change, then this change will be automatically be masked by the mapping just between the levels of the conceptual and internal level. Moreover, you can get this type of data independence by the database internal level, by transferring from the conceptual level to the internal level of the database.

So basically, it allows you to alter the physical data without making ay change or modifications in the logical data or any schema. Let take a look at a case in which we want to change or we want to update our system of storage itself and let’s consider that we want to update our hard disks with the SSD. While in doing this so, it will have not any kind of effect on any scheme or logical data.

Physical data independence usually happens at a logical level.

How can we achieve physical data independence?

We can achieve this when we modify our physical layer to a logical layer in mapping that is PP-LL mapping and in this way we can know that whatever type of modification is don is localized.

There are some examples of changes when you are working under the physical data independence:

Examples:

So, whenever you are bringing change under this type of data independence then absolutely this would not change any effect on the conceptual level.

  • Whenever you modify the index
  • When you change the location of your database i.e. if you want to change the location from one drive to another drive
  • When you change data structure to a different structure
  • When you use some storage device i.e. for storing the data like tapes.
  • When you alter or modify your database file organization technique
  • When you alter the access and its method
  • When you alter the technique of compression and some other hashing algorithm

Logical data independence

So if we see the logical data independence then basically it allows altering the conceptual scheme without any type of change.

Logical data is data that is about database plus it also stores the data that how the data is basically inside the disk. Let’s take a look at a case and let suppose that we want to store data or any table in our database plus all its constraints that will be applied to this table. Hence the logical data independence will allow us to make any changes in the table without changing the data that is on the disk.

So basically there are two main themes in this type of data independence in which we change our conceptual scheme without changing the following

  • External views
  • External program or API

If we have done or made any change then it will be masked or suppressed by the mapping that will be between the conceptual and the external levels.

As we have said earlier that physical data independence is very easy to achieve while on the other hand, it may prove challenging to achieve.

Logical data independence usually happens at the internal level.

How can we achieve logical data independence?

This type of data independence can be achieved when we modify the logical layer from the view layer that is VV-LL mapping,

There are some examples of changes whenever you are working under the logical data independence.

Examples

Any change under the logical data independence will not cause any effect in the external level of the database.

  • Whenever you modify/alter/add/delete any old or new property then it can be achieved without altering those application programs that are already existing.
  • Whenever you merge the fragments of records like two or more into one record.
  • Or whenever you break the already existing records into two or more than two records

Brief Differences in physical and logical data independence:

Physical data independence                Logical data independence
It basically deals with that how can we store  data in our system                                                It is basically deals with the structure of data and how we can change our data.
We can achieve it easilyIt is very difficult to achieve
We can retrieve it easilyWe can not retrieve it easily  because as we know that the data is depending on the logical data structure
If we make any change in the physical level then it do not require any change in the level of applicationIf we make any change in the physical level then we have to make changes in the application level.
When we want to improve the efficiency of the structure then in this we do not need to modify the internal levelWhenever we want to change the database logical structure then we have to modify the logical level that is significant
It deals with the internal schemaIt deals with conceptual schema
example:  devices for storage, some changes in the compression technique, hashing algorithms e.t.c.Example: we may add , subtract, or modify a new property

Why is data independence lacking in the systems file?

Data independence is when you have to access the data and you change the data storage without altering the ability of the program.

So a program that has to define the file of the system’s file then must define how to do and what to do next. As a result, if this, every program will have some line that will define that how a specific file will get open, it will specify some definition of fields and some specifications of the records. While on the hand if we see the data dependency then it may be done some complications to the file. It may make the system’s file very complicated when we see from the eye of a programmer and the manager of the database.

Importance of the data independence

  • It may help you so you can revise or improve your state that is not divided or not damaged
  • It may help you to reduce the incongruity of your database
  • You may make any change or you can easily modify the changes in the physical data independence and you may require it so that may improve the efficiency of your system.
  • You never need to change the structure of data in the application program.
  • Furthermore, it also assists you to increase the efficiency or quality of the data.
  • It is very affordable to maintain the system of the database.
  • It may assist you to improve the security of the database
  • You may set standards in the database system
  • When you develop a database then may allow you to have concentration other general structure of the database without any other second thought of any changing in the internal schema.

Summary/Conclusion

  • Data independence is an attribute of the DBMS that may assist you to alter the database schema at a level of the system of the database without altering the schema of the database at the other higher level.
  • There are two types of data independence that basically operate on three levels of database and they are physical data independence and logical data independence
  • Physical data independence assists you from the internal level you can separate the conceptual level.
  • Logical data independence on the other hand assists you to alter the conceptual scheme without making any change.
  • From both types of data independence, physical data independence is easy to achieve.
  • And finally, data independence may enhance the quality of the data.

Also read How John Chao Got Data Scientist Job at LinkedIN

Data Independence in DBMS

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top