November 22, 2024

Data Abstraction and Independence:

In DBMS, Data abstraction means hiding data at different levels to achieve data independence.

Data abstraction levels are placed between users and the database to achieve consistency, Independence, and controlled access.

We have three levels of abstraction

Physical level:

This is the lowest level of data abstraction. It describes how data is actually stored in a database. You can get the complex data structure details at this level.

Logical level:

This is the middle of data abstraction. It describes what data is stored in a database.

View level:

Highest level of data abstraction. This level describes the user interaction with a database system.

Example: Let’s say we are storing customer information in a customer table.

At the physical level, these records can be described as blocks of storage. (bytes, gigabytes, terabytes, etc) in memory. These details are often hidden from the programmers.

At the logical level, these records can be described as fields and attributes along with their data types, and their relation to each other can be logically implemented. The programmers generally work at this level because they are aware of such things as database systems. At the view level, Users just interacts with a system with the help of GUI and enter the details on the screen, they are not aware of how the data is stored and what data is stored; such details are hidden from them.

DBMS Schema: internal, Conceptual, External

Database systems comprise complex data structures. Thus, to make the system efficient for the retrieval of data and reduce the complexity of the users, developers use the method of Data Abstraction.

There are mainly three levels of Data Abstraction:

Internal level: Actual Physical storage structure and access paths.

Conceptual or Logical Level: Structure and constraints for the entire database.

External or view level: Describe various user views.

A database schema is the skeleton structure that represents the logical view of the entire database. It defines how the data is organized and how the relations among them are associated. It formulates all the constraints that are to be applied to the data.

A database schema defines its entities and the relationship among them. It contains a descriptive detail of the database, which can be depicted by means of schema diagrams. It’s the database designers who design the schema to help programmers understand the database and make it.

DBMS Instance

The data stored in a database at a particular moment of time is called an instance of the database. Database schema defines the variable declarations in tables that belong to a particular database; the values of these variables at a moment of time is called the instance of that database.

 For example, let’s say we have a single table student in the database, today the table has 100 records, so today the instance of the database has 100 records. Let’s say we are going to add another 100 records to this table by tomorrow so the instance of the database tomorrow will have 200 records in a table.

In short, at a particular moment, the data stored in databases is called the instance, which changes Over time we add or we add or delete data from the database.

Leave a Reply

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