Levels of Abstraction in DBMS
Data abstraction is a way to hide unwanted or irrelevant information from the end user in DBMS. It helps in enhancing the security of data, and simplifies database design using different levels. In this article we are going to discuss what are different levels of abstraction in DBMS. Firstly, let’s start with the brief introduction of DBMS.
Introduction to DBMS
A database management system (DBMS) is a software application that interacts with the user, other applications, and the database itself to capture and analyze the data. A DBMS allows users to create, read, update, and delete (CRUD) data in a database.
Some common functions of a DBMS include:
- Storing data in a structured format such as tables or objects.
- Providing a way to search for and retrieve specific data from the databases.
- Ensuring the integrity and security of the data including controlling access to the data and backing up the data to prevent loss.
- Providing tools for organizing and analyzing the data such as reporting and data mining.
Fig 1.1: DBMS structure
There are different types of DBMS, ranging from small systems that run on personal computers to large, complex systems that support the data needs of large organizations. Some examples of DBMSs include MySQL, Oracle and Microsoft SQL Server.
Characteristics of DBMS
Some key characteristics of a DBMS include:
- Data independence: A DBMS allows the data to be separated from the application that uses it, which means that changes to the data or to the application do not affect each other.
- Data security: A DBMS includes features to ensure that the data is protected from unauthorized access or modification.
- Data integrity: A DBMS ensure that the data is accurate, consistence and complete. It also provides mechanisms to detect and correct errors in the data.
- Data manipulation: A DBMS provides tools and languages for adding, modifying and deleting data in the database.
- Data concurrency: A DBMS allows multiple users to access and modify the data simultaneously without conflicts.
Levels of Abstraction in DBMS
In a database management system (DBMS), there are several levels of abstraction that are used to represent and manage data. These levels of abstraction include:
Fig 1.2: Level of Abstraction in DBMS
- Physical level: This is the lowest level of abstraction in a DBMS and it deals with the storage and retrieval of data on the physical storage medium such as a hard drive or SSD. The physical level involves the organization of data into structures such as files and indexes and the use of techniques such as file mapping and buffering to optimizing data access.
At the physical level, the DBMS must manage the allocation of space on the storage medium, which involves dividing the available space into blocks or pages and allocating these blocks or pages to the different data structure that make up the database. The DBMS must also handle issues such as file fragmentation, which occurs when the data is stored in non-contiguous blocks on the storage medium. - Logical level: This level of abstraction deals with the logical representation of the data independent of the physical storage of the data. The logical level defines the structure of the data including the data types, attributes, and relationships between data entities.
For example, the DBMS might define a “customer” entity with attributes such as “customer_id”, “name” and “address” and a “purchase” entity with attributes such as “purchase_id”, “customer_id” and “purchase_id”, “customer_id” and “purchase_date”. The DBMS would also define the relationship between these two entities such that each customer can have multiple purchases, but each purchase is associated with a single customer. - View level: This level of abstraction deals with the way that the data is presented to the user or application. A view is a virtual table that is created based on a SELECT statement and it can be used to present the data in a particular way, or to hide certain data from the user.
For example, the DBMS might provide a user interface that allows the user to browse and search the data or it might provide a set of predefined queries that the user can use to retrieve specific subsets of data. The DBMS might also provide tools for importing and exporting data, as well as for creating and modifying the data structure and relationships with in the database. - Conceptual level: This is the highest level of abstraction in a DBMS and it deals with the overall structure and organization of the data in the database. The conceptual level defines the data entities, attributes, and relationships between them and it provides a high level overview of the entire database.
By using these different levels of abstraction, a DBMS can provide a flexible and efficient way to represent and manage data while hiding the complexity of the underlying physical storage and organization of the data.
Conclusion
In conclusion, a database management system (DBMS) is a software application that is used to create, maintain and manage databases. It provides a way to create, modify and access the data in a database as well as to control access to the data in a database as well as to control access to the data and ensure its integrity and security. DBMS has mainly four levels of abstraction, which are Physical level, logical level, view level, and Conceptual level. Each level has its own specification and functionality to manage data.