Notes 2
Notes 2
DATA Language
A data sublanguage mainly has two parts:
● DDL stands for Data Definition Language. It is used to define database structure or pattern.
● It is used to create schema, tables, indexes, constraints, etc. in the database.
● Using the DDL statements, you can create the skeleton of the database.
● Data definition language is used to store the information of metadata like the number of tables and
schemas, their names, indexes, columns in each table, constraints, etc.
These commands are used to update the database schema that's why they come under Data definition
language.
● DCL stands for Data Control Language. It is used to retrieve the stored or saved data.
● The DCL execution is transactional. It also has rollback parameters.
(But in Oracle database, the execution of data control language does not have the feature of rolling back.)
There are the following operations which have the authorization of Revoke:
The host language compiler then generates the object code. Some special types of programming
languages combine Pascal-like control structures with control structures for the manipulation of a
database. These are sometimes called Fourth-Generation Languages. They often include features
which to generate forms and display data.
• Sophisticated Users interact with the system without writing programs :They form requests by
writing queries in a database query language. These are submitted to a query processor that breaks
a DML statement down into instructions for the database manager module.
• Specialized Users are sophisticated users writing special database application programs. These
may be CADD systems, knowledge-based and expert systems, complex data systems (audio/video),
etc.
• Naive Users are unsophisticated users who interact with the system by using permanent application
programs (e.g. automated teller machine).
DBMS Schema
Definition of schema: Design of a database is called the schema. Schema is of three types:
Physical schema, logical schema and view schema.
For example: In the following diagram, we have a schema that shows the relationship
between three tables: Course, Student and Section. The diagram only shows the design of
the database, it doesn’t show the data present in those tables. Schema is only a structural
view(design) of a database as shown in the diagram.
DBMS Instance
Database systems comprise of complex data structures. Thus, to make the system
efficient for retrieval of data and reduce the complexity of the users, developers use the
method of Data Abstraction.
It never deals with the physical devices. Instead, internal schema views a physical device
as a collection of physical pages
Conceptual Schema/Level
The conceptual schema describes the Database structure of the whole database for the
community of users. This schema hides information about the physical storage structures
and focuses on describing data types, entities, relationships, etc.
This logical level comes between the user level and physical storage view. However, there
is only single conceptual view of a single database.
External Schema/Level
An external schema describes the part of the database which specific user is interested in.
It hides the unrelated details of the database from the user. There may be "n" number of
external views for each database. Each external view is defined using an external
schema, which consists of definitions of various types of external record of that specific
view.
An external view is just the content of the database as it is seen by some specific
particular user. For example, a user from the sales department will see only sales related
data.
● An external level is only related to the data which is viewed by specific end users.
● This level includes some external schemas.
● External schema level is nearest to the user
● The external schema describes the segment of the database which is needed for a
certain user group and hides the remaining details from the database from the
specific user group
● Every user should be able to access the same data but able to see a customized
view of the data.
● The user need not to deal directly with physical database storage detail.
● The DBA should be able to change the database storage structure without
disturbing the user's views
● The internal structure of the database should remain unaffected when changes.
Made to the physical aspects of storage.