We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7
Data ABSTRACTION
1. What is Data Abstraction?
2. Levels of Abstraction 3. Examples 4. Benefits of Abstraction Introduction to Database Components of Database/DBMS Data Abstraction Definition: Data abstraction is a way to hide the complexity of the database structure and operations from the end-user or developer. It provides a simplified view of the data, allowing users to interact with it without needing to understand the underlying details. Example: Online Bookstore Imagine an online bookstore where customers can browse and purchase books. The database behind this system stores information about books, authors, orders, and customers. Without Abstraction ∙ User/Developer: Must understand the table structures, relationships, and write complex SQL queries to fetch data. ∙ Tasks: o Retrieve all books by a specific author. o Check stock availability. o Process orders and update inventory. With Abstraction ∙ User/Developer: Interacts with the database through a simplified interface or API, without needing to know the details of the database schema or SQL. ∙ Tasks: Same as above, but performed through high-level operations provided by the abstraction layer. Data Abstraction Levels 1. View Level Definition: The view level is the highest level of abstraction, presenting data in a way that is easy for end-users to understand and interact with. Example: Online Bookstore ∙ User Perspective: Customers see an easy-to-navigate interface where they can search for books by title, author, or genre. ∙ Tasks: o Search for books by J.K. Rowling. View book details, such as title, price, and availability. 2. Logical Level Definition: The logical level defines what data is stored in the database and the relationships between different pieces of data. It abstracts the data structure, focusing on data organization and relationships. Example: Online Bookstore ∙ Developer Perspective: Developers see a simplified schema with tables and relationships but do not deal with physical storage details. ∙ Tasks: o Define tables for books, authors, orders, and customers. o Establish relationships between these tables (e.g., each book has one author). 3. Physical Level Definition: The physical level describes how data is actually stored in the database. It deals with the storage details, such as file organization, indexing, and data compression. Example: Online Bookstore ∙ Database Administrator Perspective: Administrators manage how data is stored on disk, optimized for performance and storage efficiency. ∙ Tasks: o Set up physical storage structures (e.g., files, indexes). o Optimize data retrieval and storage performance. Benefits of Data Abstraction • Simplified Interaction: Users and developers can perform complex operations without understanding the database schema or SQL. • Increased Productivity: Developers can focus on application logic rather than database details. • Consistency: Ensures consistent access and manipulation of data through well-defined interfaces. • Maintainability: Changes in the database structure can be managed within the abstraction layer without affecting the application code. Diagram:-