Data Abstraction
Data Abstraction
Data abstraction is the procedure of concealing irrelevant or unwanted data from the end user.
The main purpose of data abstraction is to hide irrelevant data and provide an abstract view of the data. With the help of data
abstraction, developers hide irrelevant data from the user and provide them the relevant data. By doing this, users can access the data
without any hassle, and the system will also work efficiently.
example, if you go to a shop to buy a pair of shoes, you ask the shopkeeper to show you the shoes of a certain company, and you also
tell the shopkeeper about the size, color, and material you want.
will you be asking the shopkeeper questions such as, where are these shoes made? From where does the material come? What is t he
cost of the material?
You will not ask these questions because these questions are of no use. You do not care about these questions. You are only concerned
about a few things, such as the company, size, color, material, and how the shoes look. That is why these unimportant details are kept
hidden from the end user. This is the process we call data abstraction.
Logical Level: View Level :
Physical The logical level provides a
conceptual view of the database
The view level provides a
customized or tailored view of
data is stored on the physical between tables, integrity hide sensitive information. Views
constraints, and security can also combine data from
storage devices such as disks. It
includes details such as data constraints. Users interact with multiple tables or perform
storage format, file organization, the database at this level by calculations to provide a more
writing queries and commands in convenient representation of the
indexing methods, and access
paths. Users and applications a high-level data definition data. Users interact with the
typically do not interact directly language (DDL) and data database through these views,
manipulation language (DML) to which can simplify complex
with this level of abstraction.
create, retrieve, update, and queries and ensure data security
delete data. by limiting access to specific data
subsets.
Data Abstraction: Hiding Complexity
Conceptual Level Logical Level Physical Level
The conceptual level of data The logical level of data abstraction The physical level of data abstraction
abstraction provides users with a defines the structure and organization deals with the low-level, hardware-
high-level, simplified view of the of the data within the database, specific details of data storage and
database, hiding the complex internal including entities, attributes, and retrieval. This level is responsible for
structure and implementation details. relationships. This level represents the efficient and optimized storage
This abstraction allows users to focus the data in a way that is independent and access of data, leveraging
on the essential information and of the physical storage techniques like indexing, partitioning,
relationships, without getting bogged implementation, ensuring data and physical data structures.
down in the technical complexities. independence and flexibility.
Data Adminis trators (DBA)
Data Administrators (DBA) decide how to arrange data and where to store data. The Data Administrator (DBA) is the person
whose role is to manage the data in the database at the physical or internal level. There is a data center that securely stores the
raw data in detail on hard drives at this level.
The logical level or conceptual level is less complex than the physical level. With the help of the logical level, Data Administrators
(DBA) abstract data from raw data present at the physical level.
Achieving Data Independence
• Data independence can be explained using the three-schema architecture.
• Data independence refers characteristic of being able to modify the schema at one level of the database system without altering the
schema at the next higher level.
4 TRUNCATE
The TRUNCATE statement in DDL is a specialized command that quickly removes all data from a table, while preserving the table structure.
This is useful for clearing large datasets or resetting a table to its initial state, without the need to drop and recreate t he table.
Data Manipulation Language (DML)
Its used to Manipulate the data in the database by using different commands. In this category we can able to perform Insert new data into Table,
Update existing data in the Table, Delete Data from the Table
SELECT
The SELECT statement in DML is the primary means of retrieving data from a database. It allows users to specify the desired columns, filter
and sort the data, and combine information from multiple tables, facilitating the extraction of relevant information for analysis and reporting.
Data Manipulation with SQL
2 Attributes
Attributes are the characteristics or properties that define an entity. Each entity has a set of attributes that describe its essential
features, such as a customer's name, address, and phone number, or a product's price, description, and SKU.
3 Relationships
Relationships in the ER model represent the meaningful connections between entities. These relationships can be one-to-one, one-
to-many, or many-to-many, and they are crucial for capturing the inherent associations within the database, such as a customer
placing an order or a product belonging to a specific category.
Entity-Relationship Models
Identifying Entities Defining Attributes Establishing Relationships
The first step in designing an E R Once the entities are identified, the Relationships between entities are
model is to identify the key entities next step is to define the relevant crucial for capturing the meaningful
that will be represented in the attributes for each entity. Attributes connections and dependencies within
database. This involves analyzing the should capture the essential the database. Careful analysis is
problem domain, understanding the characteristics and properties of the required to determine the appropriate
business requirements, and entity, providing the necessary relationship types (one-to-one, one-
determining the essential objects or information to fulfill the database's to-many, many-to-many) and ensure
concepts that need to be stored and requirements. that the overall E R model reflects the
managed. real-world associations.
L everaging the Power of the ER Model
Flexibility The ER model provides a flexible and extensible framework for
designing databases, allowing for the representation of diverse data
structures and the evolution of the schema over time.
Clarity The visual and conceptual nature of the ER model makes it easier
for stakeholders, developers, and database administrators to
understand and communicate the data relationships and structure.