The Wayback Machine - https://web.archive.org/web/20240920035250/https://www.geeksforgeeks.org/data-abstraction-and-data-independence/
Open In App

Data Abstraction and Data Independence

Last Updated : 15 Feb, 2024
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Database systems comprise complex data structures. In order to make the system efficient in terms of retrieval of data, and reduce complexity in terms of usability of users, developers use abstraction i.e. hide irrelevant details from the users. This approach simplifies database design. 

Level of Abstraction in a DBMS

There are mainly 3 levels of data abstraction: 

  • Physical or Internal Level
  • Logical or Conceptual Level
  • View or External Level

Physical or Internal Level

This is the lowest level of data abstraction. It tells us how the data is actually stored in memory. Access methods like sequential or random access and file organization methods like B+ trees and hashing are used for the same. Usability, size of memory, and the number of times the records are factors that we need to know while designing the database. 
Suppose we need to store the details of an employee. Blocks of storage and the amount of memory used for these purposes are kept hidden from the user. 

Logical or Conceptual Level

This level comprises the information that is actually stored in the database in the form of tables. It also stores the relationship among the data entities in relatively simple structures. At this level, the information available to the user at the view level is unknown. 
We can store the various attributes of an employee and relationships, e.g. with the manager can also be stored. 

The logical level thus describes the entire database in terms of a small number of relatively simple structures. Although implementation of the simple structures at the logical level may involve complex physical-level structures, the user of the logical level does not need to be aware of this complexity. This is referred to as physical data independence. Database administrators, who must decide what information to keep in the database, use the logical level of abstraction.

View or External Level

This is the highest level of abstraction. Only a part of the actual database is viewed by the users. This level exists to ease the accessibility of the database by an individual user. Users view data in the form of rows and columns. Tables and relations are used to store data. Multiple views of the same database may exist. Users can just view the data and interact with the database, storage and implementation details are hidden from them. Even though the logical level uses simpler structures, complexity remains because of the variety of information stored in a large database. Many users of the database system do not need all this information; instead, they need to access only a part of the database. The view level of abstraction exists to simplify their interaction with the system

Example: In case of storing customer data,

  • Physical level – it will contains block of storages (bytes,GB,TB,etc)
  • Logical level –  it will contain the fields and the attributes of data.
  • View level – it works with CLI or GUI access of database

Data Abstraction

Data Abstraction

The main purpose of data abstraction is to achieve data independence in order to save the time and cost required when the database is modified or altered. 

Data Independence

Data Independence is mainly defined as a property of DBMS that helps you to change the database schema at one level of a system without requiring to change the schema at the next level. it helps to keep the data separated from all program that makes use of it.
We have namely two levels of data independence arising from these levels of abstraction: 

  • Physical level data independence
  • Logical level data independence
Data-Abstraction-and-Data-Independence

Data Independence

Physical Level Data Independence

It refers to the characteristic of being able to modify the physical schema without any alterations to the conceptual or logical schema, done for optimization purposes, e.g., the Conceptual structure of the database would not be affected by any change in storage size of the database system server. Changing from sequential to random access files is one such example. These alterations or modifications to the physical structure may include: 

  • Utilizing new storage devices.
  • Modifying data structures used for storage.
  • Altering indexes or using alternative file organization techniques etc.

Logical Level Data Independence

It refers characteristic of being able to modify the logical schema without affecting the external schema or application program. The user view of the data would not be affected by any changes to the conceptual view of the data. These changes may include insertion or deletion of attributes, altering table structures entities or relationships to the logical schema, etc.



Similar Reads

Static Data Structure vs Dynamic Data Structure
Data structure is a way of storing and organizing data efficiently such that the required operations on them can be performed be efficient with respect to time as well as memory. Simply, Data Structure are used to reduce complexity (mostly the time complexity) of the code. Data structures can be two types : 1. Static Data Structure 2. Dynamic Data
4 min read
Data Structures and Algorithms | Set 36
Que - 1. The function shiftNode() which takes as input two linked lists- destination and source. It deletes front node from source and places it onto the front of destination. Choose the set of statements which replace X, Y, Z in given function. void shiftNode(struct node** destRoot, struct node** srcRoot) { // the front of source node struct node*
4 min read
Data Structures and Algorithms | Set 37
Que - 1. For 8 keys and 6 slots in a hashing table with uniform hashing and chaining, what is the expected number of items that hash to a particular location. (A) 2.33 (B) 0.75 (C) 1.33 (D) 2 Solution: Probability that key1 ends up in slot 1 = 1/6 Probability that key2 ends up in slot 1 = 1/6 Probability that key3 ends up in slot x = 1/6 Probabilit
4 min read
Relationship between Data Mining and Machine Learning
There is no universal agreement on what "Data Mining" suggests that. The focus on the prediction of data is not always right with machine learning, although the emphasis on the discovery of properties of data can be undoubtedly applied to Data Mining always. So, let's begin with that: data processing may be a cross-disciplinary field that focuses o
3 min read
Signal Processing and Time Series (Data Analysis)
Signal processing is a field of engineering that focuses on analyzing analog and digital signals with respect to time. Time Series Analysis is one of the categories of signal processing. A time series is a sequence of data points recorded at regular intervals of time. Time series analysis is an important step before you develop a forecast of the se
6 min read
Overview of Data and Information
In this article, we will discuss what is data, the importance of data, and how it played a great role in today's generation along with that we will discuss what is information and its uses. So, let's go a little bit deep into this article to understand the concept well. Data :Data is derived from the Latin word "datum" which elaborates "something g
3 min read
Parent and Child Classes Having Same Data Member in Java
In C++ we have all class member methods as non-virtual. In order to make so, we have to use a keyword as a prefix known as virtual. Whereas in Java, we have all class member methods as virtual by default. In order to make them non-virtual, we use the keyword final. Reference variables in Java are basically variables holding the address of the objec
3 min read
Characteristics of data in geographical information system (GIS)
Prerequisite - Constraints in geographical information system (GIS) There are particular characteristics of geographic data that makes the modeling more complex than in conventional applications. The geographic context, topological relations and other spatial relationship are fundamentally important in order to define spatial integrity rules. Sever
3 min read
PHP | Serializing Data
Most often we need to store a complex array in the database or in a file from PHP. Some of us might have surely searched for some built-in function to accomplish this task. Complex arrays are arrays with elements of more than one data-types or array. But, we already have a handy solution to handle this situation. We don't have to write our own func
3 min read
The World of Big Data
“No power on earth can stop an idea whose time has come.” – Victor Hugo Big data is one such remarkable idea. In today’s socially active world, data is growing at a tremendous pace of 2.5 quintillion bytes a day roughly that is only set to increase over the coming years. Business giants like Facebook, Google, LinkedIn, Twitter etc. have been amongs
7 min read
Linking Files having same variables with different data types in C
Suppose there are two codes foo1.c and foo2.c as below and here the task is to link foo1.c and foo2.c which have same variable name x but different data type i.e int in foo1.c and double in foo2.c. Note that none of the variables is declared as extern. What do you expect to be the output of the following command with given two programs? $ gcc -o my
2 min read
Snowflake Schema in Data Warehouse Model
Pre-Requisite: Data Warehouse Model The snowflake schema is a variant of the star schema. Here, the centralized fact table is connected to multiple dimensions. In the snowflake schema, dimensions are present in a normalized form in multiple related tables. The snowflake structure materialized when the dimensions of a star schema are detailed and hi
5 min read
Turing machine for copying data
Prerequisite - Turing Machine Problem - Draw a Turing machine which copy data. Example - Steps: Step-1. First convert all 0's, 1's into 0's, 1's and go right then B into C and go left Step-2. Then convert all 0's, 1's into 0's, 1's and go left then Step-3. If 1 convert it into X and go right convert all 0's, 1's into 0's, 1's and go right then conv
2 min read
Frequent Item set in Data set (Association Rule Mining)
INTRODUCTION:Frequent item sets, also known as association rules, are a fundamental concept in association rule mining, which is a technique used in data mining to discover relationships between items in a dataset. The goal of association rule mining is to identify relationships between items in a dataset that occur frequently together.A frequent i
6 min read
Puzzle | Data Recovery Problem
Suppose you have three pen drives P1, P2 and P3 each having 1GB capacity. You also have 3 GB of data. You have to divide these data into P1, P2 and P3 such that if any one of the pen drive among P1, P2, P3 got crashed than you should be able to recover all the data from remaining two pen drives. For example - if P1 crashed then you should be able t
2 min read
Expected Properties of a Big Data System
Prerequisite - Introduction to Big Data, Benefits of Big Data There are various properties which mostly relies on complexity as per their scalability in the big data. As per these properties, Big data system should perform well, efficient, and reasonable as well. Let’s explore these properties step by step. Robustness and error tolerance – As per t
3 min read
Zendrive Campus Interview Experience for Associate Data Scientist
First Round: There were 12 questions from Probability for 60 minutes. The questions were little tricky but solvable in the given time if the concepts are clear. Second Round: Do you know how to deal with time series data? How do you find correlation between two variables? How do you handle overfitting? What is Regularization? What are the types of
3 min read
6V's of Big Data
In recent years, Big Data was defined by the “3Vs” but now there is “6Vs” of Big Data which are also termed as the characteristics of Big Data as follows: 1. Volume: The name ‘Big Data’ itself is related to a size which is enormous.Volume is a huge amount of data.To determine the value of data, size of data plays a very crucial role. If the volume
3 min read
Data Mining Techniques
Data mining refers to extracting or mining knowledge from large amounts of data. In other words, Data mining is the science, art, and technology of discovering large and complex bodies of data in order to discover useful patterns. Theoreticians and practitioners are continually seeking improved techniques to make the process more efficient, cost-ef
15+ min read
Data Structure to Design a special social network
Consider a special social network where people are called connected if one person is connected to other with any number of intermediate connections. For example if a person x is connected with y and y is connected with z, then x is also considered to be connected with z. We are given a set of friend requests as input. We are also given a set of que
4 min read
Remove duplicates from unsorted array using Set data structure
Given an unsorted array of integers, print the array after removing the duplicate elements from it. We need to print distinct array elements according to their first occurrence. Examples: Input: arr[] = { 1, 2, 5, 1, 7, 2, 4, 2} Output: 1 2 5 7 4 Explanation: {1, 2} appear more than one time. Input: arr[] = { 3, 3, 4, 1, 1} Output: 3 4 1 Approach:
3 min read
Proof of Concept on News Aggregator using Big Data Technologies
Big Data is a huge dataset that can have a high volume of data, velocity, and variety of data. For example, billions of users searching on Google at the same time and that will be a very large dataset. In this, we will discuss Proof of concept(POC) on news aggregator using Big Data (Hadoop, hive, pig). And will perform operations based on MapReduce
3 min read
Process Of JPEG Data compression
JPEG stands for Joint Photographic Experts Group. We perform such type of compression to reduce the size of the file without damaging its quality. By reducing the size we can store it in a huge amount which was not possible earlier. Reducing the size of images will also improve the efficiency of the system as it will give less load on it. Process O
3 min read
The Future of Data Science
For years we have heard that ‘Data Science is the future’, however, after all these years of individuals flocking into this domain, the question that begs to be answered is, ‘What is the future of Data Science?’. Evolution The evolution of Data Science over the years has taken form in many phases. It all started with Statistics. Simple statistics m
4 min read
What are the C programming concepts used as Data Structures
Data Types Data-type in simple terms gives us information about the type of data. Example, integer, character, etc. Data-types in C language are declarations for the variables. Data-types are classified as: Primitive or Built-in data types Some of the examples of primitive data types are as follows Variable named ch refers to the memory address 100
10 min read
HDFS - Data Read Operation
HDFS is a distributed file system that stores data over a network of commodity machines. HDFS works on the streaming data access pattern means it supports write-ones and read-many features. Read operation on HDFS is very important and also very much necessary for us to know while working on HDFS that how actually reading is done on HDFS(Hadoop Dist
4 min read
Different Phases of Projected Clustering in Data Analytics
We know Projected clustering is a typical dimension reduction subspace clustering method which instead of initiating from single dimensional spaces, proceeds by identifying an initial approximation of the clusters in high dimensional attribute space. But to do this projected clustering algorithm goes through different phases. In this article, we ar
3 min read
Attributes of Data Warehouse
A data warehouse is meant for only query and analysis rather than transaction processing. The data warehouse is essentially subject-oriented, non-volatile, integrated, time-variant, and consists of historical data stored over long periods of time. A blueprint of BI and data mining algorithms. Data marts :Data marts are subsidiary data warehouses an
3 min read
Data Breach
Data Breach means accessing someone's data without knowing them or without any authorization. Data Breach also called data leaking or information leaking. Data can be of any type it may be health-related data, can be business-related data, or any other sensitive data. Someone may be done intentionally or unintentionally and can use it to harm you p
6 min read
Various terms in Data Mining
Data mining has applications in multiple fields like science and research. It is a prediction based on likely outcomes. Its focuses on the last data set. Data mining is the procedure of mining knowledge from data. The knowledge extracted so can be used for any of the following applications such as production control, market analysis, science explor
3 min read
Article Tags :
Practice Tags :