1. Data Abstraction, Data Model &
Database Language
Fatema tuj Johora
Lecturer,
Department of CSE,DIU
2. Topic of Discussion
Data Abstraction
Instance and Schema
Data Model
Data language
3. Data abstraction
Data abstraction is hiding the complex data
structure in order to simplify the user’s
interface of the system.
Data abstraction allow developers to keep
complex data structures away from the users
through levels of abstraction.
The main purpoes of data abstraction is to
achieve data independence in order to save time
& cost, it also make it easier and safer for users
to access data by hiding complex data structure
and relationship.
4. Three level of data abstraction or
Three schema Architecture
(external level)
( Conceptual level)
(Internal level)
User
databas
e
5. View level or external level
It is the highest level of data abstraction and
exhibits only a part of the whole database.
It exhibits the data in which the user is
interested.
The view level can describe many views of the
same data.
6. Logical level or Conceptual level
In logical level, the data is stored in the form of
the entity set, entities, their data types, the
relationship among the entity sets, user
operations performed to retrieve or modify the
data and certain constraints on the data.
7. Physical or Internal level
The physical or the internal level schema
describes how the data is stored in the
hardware.
It also describes how the data can be accessed.
The physical level shows the data abstraction at
the lowest level and it has complex data
structures.
Only the database administrator operates at this
level.
8. Instances and Schemas
Logical Schema – the overall logical structure of the
database
Example: The database consists of information about
a set of customers and accounts in a bank and the
relationship between them
Analogous to type information of a variable in a
program
Physical schema– the overall physical structure of the
database
Instance – the actual content of the database at a
particular point in time
9. Data Model
A Database model defines the logical design and
structure of a database and defines how data will be
stored, accessed and updated in a database
management system.
Relational model
Entity-Relationship data model (mainly for database
design)
Object-based data models (Object-oriented and Object-
relational)
Semistructured data model (XML)
Other older models:
Network model
Hierarchical model
10. SQL
SQL stands for Structured Query Language
SQL is a standard language for accessing and
manipulating databases.
SQL commands are instructions. It is used to
communicate with the database.
SQL can perform various tasks, like- create a
table, add data to tables, drop the table, modify
the table, set permission for users.
11. Types of SQL Commands
There are five types of SQL commands:
DDL (Data Definition Language)
DML (Data Manipulation Language)
DCL (Data Control Language)
TCL (Transection Control Language )
DQL (Data Query Language)
13. DDL
Examples of DDL commands:
CREATE – is used to create the database or its objects (like
table, index, function, views, store procedure and triggers).
DROP – is used to delete objects from the database.
ALTER- is used to add, delete, or modify columns in an
existing table
TRUNCATE–is used to remove all records from a table,
including all spaces allocated for the records are removed.
COMMENT –is used to add comments to the data dictionary.
RENAME –is used to rename an object existing in the
database.
14. DML
Examples of DML:
INSERT – is used to insert data into a table.
UPDATE – is used to update existing data within
a table.
DELETE – is used to delete records from a
database table.
15. DCL
Examples of DCL:
GRAND – It is used to give user access privileges
to a database.
REVOKE – It is used to take back permissions
from the user.
16. TCL
Examples of DCL:
COMMIT – Commit command is used to save all
the transactions to the database.
ROLLBACK– Rollback command is used to undo
transactions that have not already been saved to
the database.
SAVEPOINT– It is used to roll the transaction
back to a certain point without rolling back the
entire transaction.
17. DQL
Examples of DCL:
SEARCH – It is used to select the attribute based
on the condition described by WHERE clause.