Data Abstraction in DBMS YASH PAL, July 9, 2021December 2, 2024 Data Abstraction in DBMS – means hiding the complexity of data from the users. while creating the data developers can use complex data structures to represent the data in the database. since the users that are using these data are not aware of the complexity of the data. so the developers hide the complex part of the data in different levels so that the user can get the data in a simple form. and the hiding of data is called data abstraction in DBMS. Data Abstraction Three Levels of Data Abstraction in DBMS Physical level Logical Level View Level Physical level This is the lowest level of abstraction that describes how the data is stored. this level describes the complex part of the data structure in detail. Database Management System Applications Logical level This is the higher level than the physical level that describes what data are stored in the database and the relationship among those data. it describes the database in a small number of relatively simple structures. although some complex physical level structures are present at this level users don’t need to worry about that complexity part. View Level This is the highest level of abstraction that describes the entire database. it may happen that all the users may not need all the information or data that is present in the database. so this level defines some views so that the required view can be loaded on a request. For example, we have described a record as follows type instructor = record ID : char (5); name : char (20); dept name : char (20); salary : numeric (8,2); end; we have defined a new record of a type called instructor with four fields and each field has a name and a type associated with it. we can also define some more record types like department record with fields dept_name, building, and budget course record with fields course_id, title, dept_name, and credits student record with fields ID, name, dept_name, and tot_cred At the physical level, the records can be described as a block of consecutive storage locations just like we define instructor, department, or student records. At the logical level, each record is described by the type definition, just like in the above code we define the interrelationship of these records. At the view level, several views of the database are defined and a user can see some or all of these views. and at this point, views also provide a security mechanism to prevent users from accessing certain parts of the database. Instances and Schemas in DBMS The collection of information stored in the database at a particular time is called an instance of the database and the overall design of the database is called the database schema. Whenever the information is inserted and deleted the database changes with changes. also, the schemas of the database change infrequently. we can understand the schemas and instances of the database by analogy to a program written in a programming language. A database schema corresponds to the variable declarations with the associated type definitions in a program. each variable has its particular value at a given instant. and the value of the variable in a program corresponds to an instance of a database schema. Database systems have many schemas, that are partitioned according to the abstraction levels. the physical schema describes the database design at the physical level and the logical schema describes the database design at the logical level. A database may also have several schemas at the view level, called subschemas that describe the different views of the database. programmers use logical schema to construct the applications. the physical schema is hidden at the logical schema and can usually be hung easily without affecting application programs. database engineering subjects DMBSengineering subjects