0% found this document useful (0 votes)
10 views5 pages

Physical Data Independence

The document discusses different types of database languages used for different purposes. Data Definition Languages (DDL) are used to define and modify database schemas. Data Manipulation Languages (DML) are used to access and manipulate data. Data Control Languages (DCL) are used to grant and revoke user access. Transaction Control Languages (TCL) are used to commit or rollback transactions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views5 pages

Physical Data Independence

The document discusses different types of database languages used for different purposes. Data Definition Languages (DDL) are used to define and modify database schemas. Data Manipulation Languages (DML) are used to access and manipulate data. Data Control Languages (DCL) are used to grant and revoke user access. Transaction Control Languages (TCL) are used to commit or rollback transactions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Physical Data Independence Logical Data Independence

It mainly concern about how the data It mainly concerned about the structure
is stored into the system. or the changing data definition.

It is difficult to retrieve because the


data is mainly dependent on the logical
It is easy to retrieve. structure of data.

As compared to the logical As compared to the physical


independence it is easy to achieve independence it is not easy to achieve
physical data independence. logical data independence.

Any change at the physical level,


does not require to change at the The change in the logical level requires
application level. a change at the application level.

The modifications made at the internal The modifications made at the logical
level may or may not be needed to level is significant whenever the logical
improve the performance of the structure of the database is to be
structure. changed.

It is concerned with the internal It is concerned with the conceptual


schema. schema.

Anomalies
1- Update Anomaly: Let say we have 10 columns in a table out of
which 2 are called employee Name and employee address. Now if one
employee changes it’s location then we would have to update the table.
But the problem is, if the table is not normalized one employee can
have multiple entries and while updating all of those entries one of
them might get missed
.
2- Insertion Anomaly: Let’s say we have a table that has 4 columns.
Student ID, Student Name, Student Address and Student Grades. Now
when a new student enroll in school, even though first three attributes
can be filled but 4th attribute will have NULL value because he doesn't
have any marks yet

3- Deletion Anomaly: This anomaly indicates unnecessary deletion


of important information from the table. Let’s say we have student’s
information and courses they have taken as follows (student
ID,Student Name, Course, address). If any student leaves the school
then the entry related to that student will be deleted. However, that
deletion will also delete the course information even though course
depends upon the school and not the student
Database languages are used to perform a variety of critical tasks
that help a database management system function correctly. These
tasks can be certain operations such as read, update, insert, search,
or delete the data stored in the database.
Types of Database Languages

The Data Languages are categorized into four different types based upon the various
operations performed by the language. These include:

database languages are used to read, update and store data in a database.
There are several such languages that can be
used for this purpose; one of them is SQL
(Structured Query Language).

Types of DBMS languages:


Data Definition Language (DDL)
DDL is used for specifying the database schema. It is used for
creating tables, schema, indexes, constraints etc. in database.
Lets see the operations that we can perform on database using DDL:
 To create the database instance – CREATE
 To alter the structure of database – ALTER
 To drop database instances – DROP
 To delete tables in a database instance – TRUNCATE
 To rename database instances – RENAME
 To drop objects from database such as tables – DROP
 To Comment – Comment

All of these commands either defines or update the database schema that’s why
they come under Data Definition language.

Data Manipulation Language (DML)


DML is used for accessing and manipulating data in a database. The following
operations on database comes under DML:

 To read records from table(s) – SELECT


 To insert record(s) into the table(s) – INSERT
 Update the data in table(s) – UPDATE
 Delete all the records from the table – DELETE

Data Control language (DCL)


DCL is used for granting and revoking user access on a database –

 To grant access to user – GRANT


 To revoke access from user – REVOKE

In practical data definition language, data manipulation language and data control
languages are not separate language, rather they are the parts of a single
database language such as SQL.

Transaction Control Language(TCL)


The changes in the database that we made using DML commands are either
performed or rollbacked using TCL.

 To persist the changes made by DML commands in database – COMMIT


 To rollback the changes made to the database – ROLLBACK
Data Abstraction in DBMS
Database systems are made-up of complex data
structures. To ease the user interaction with database,
the developers hide internal irrelevant details from
users. This process of hiding irrelevant details from
user is called data abstraction.
We have three levels of abstraction:

Physical level: This is the lowest level of data


abstraction. It describes how data is actually stored in
database. You can get the complex data structure
details at this level.
Logical level: This is the middle level of 3-level data abstraction architecture. It
describes what data is stored in database.
View level: Highest level of data abstraction. This level describes the user
interaction with database system.

You might also like