0% found this document useful (0 votes)
13 views25 pages

DB Lec 05

The document outlines various Database Management System (DBMS) languages and interfaces, including Data Definition Language (DDL), Data Manipulation Language (DML), Data Control Language (DCL), and Transaction Control Language (TCL). It also discusses different types of DBMS interfaces such as menu-based, form-based, graphical user, and natural language interfaces. Additionally, the document classifies DBMS based on data models, user numbers, costs, and access paths.

Uploaded by

waseem khosa
Copyright
© © All Rights Reserved
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
0% found this document useful (0 votes)
13 views25 pages

DB Lec 05

The document outlines various Database Management System (DBMS) languages and interfaces, including Data Definition Language (DDL), Data Manipulation Language (DML), Data Control Language (DCL), and Transaction Control Language (TCL). It also discusses different types of DBMS interfaces such as menu-based, form-based, graphical user, and natural language interfaces. Additionally, the document classifies DBMS based on data models, user numbers, costs, and access paths.

Uploaded by

waseem khosa
Copyright
© © All Rights Reserved
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/ 25

1

Database Systems
Lecture 5

DBMS Languages and Database Management


Interfaces Systems
2

Database Manageme
nt Systems

Today’s agenda
• DBMS Languages
▫ Data Definition Language (DDL)
▫ Data Manipulation Language (DML)
▫ Data Control Language (DCL)
▫ Transaction Control Language (TCL)
▫ Storage Definition Language (SDL)
▫ View Definition Language (VDL)
• DBMS Interfaces
3

Database Manageme
nt Systems

DBMS Languages
• Data Definition Language (DDL): In many DBMSs
where no strict separation of levels is maintained, DDL
is used by the DBA and database designers to define
both conceptual and internal schemas.

• DBMS will have a DDL compiler whose function is to


process DDL statements in order to identify
descriptions of the schema constructs and store the
schema description in the DBMS catalog.

• Where a clear separation is maintained between the


conceptual and internal levels, the DDL is used to
specify the conceptual schema only.
4

Database Manageme
nt Systems

Data Definition Language (DDL)


• 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.
5

Database Manageme
nt Systems

Data Definition Language (DDL)

Here are some tasks that come under DDL:

CREATE DATABASE - creates a new


database
ALTER DATABASE - modifies a database
CREATE TABLE - creates a new table
ALTER TABLE - modifies a table
DROP TABLE - deletes a table
CREATE INDEX - creates an index (search
key)
DROP INDEX - deletes an index
6

Database Manageme
nt Systems

Storage Definition Language (SDL)

• Is used to specify the Internal schema


• The mapping between two schemas may
be specified in either DDL or SDL
• For the true three-schema architecture
we need more
7

Database Manageme
nt Systems

View Definition Language


(VDL)
• Is used to specify the user view
• Mapping the view in conceptual schema
• In most DBMS DDL is used for both
conceptual and external schemas
E.g. :
• CREATE VIEW STDVIEW AS SELECT
ID,NAME,ADDRESS FROM STD;
• DROP VIEW STDVIEW
8

Database Manageme
nt Systems

Data Manipulation Language (DML)

It is used for accessing and manipulating


data in a database. It handles user requests.
Here are some tasks that come under DML:
Select: It is used to retrieve data from a
database.
Insert: It is used to insert data into a table.
Update: It is used to update existing data
within a table.
Delete: It is used to delete all records from
a table.
Lock Table: It controls concurrency.
9

Database Manageme
nt Systems

DBMS Languages
• Data Manipulation Language (DML):
Used to specify database retrievals and
updates.
• DML commands (data sublanguage) can
be embedded in a general-purpose
programming language (host language),
such as COBOL, C or an Assembly
Language.
• Alternatively, stand-alone DML commands
can be applied directly (query language).
10

Database Manageme
nt Systems

DBMS Languages
• High Level or Non-procedural Languages: also
called set at a time, e.g., SQL, are set-oriented and
specify what data to retrieve rather than how to
retrieve. Also called declarative languages.
• Low Level or Procedural Languages: also called
record-at-a-time; they specify what data to retrieve
and how to retrieve data and include constructs such
as looping.

• Casual users utilize high-level query language,


programmers utilize DML in embedded form, naïve
users utilize user-friendly interfaces (casual or other
users can also utilize the same)
11

Database Manageme
nt Systems

Data Control Language (DCL)


Here are some tasks that come under DCL:

Grant: It is used to give user access


privileges to a database.
Revoke: It is used to take back permissions
from the user.
12

Database Manageme
nt Systems

Transaction Control Language (TCL)


• Transaction control language (TCL) manages
the transactions within a database.
Transactions group a set of related tasks into
a single, executable task. Here's a list of TCL
statements:
• COMMIT: Carries out a transaction
• ROLLBACK: Restores a transaction if any
tasks fail to execute
• SAVEPOINT: Sets a point in a transaction to
save
13

Database Manageme
nt Systems

DBMS Interfaces
• Menu-Based interfaces for Web Clients or
Browsing
• Form-Based Interfaces
• Graphical User Interfaces
• Natural Language Interfaces
• Interfaces for Parametric Users
• Interfaces for the DBA
14

Database Manageme
nt Systems

Menu-Based Interfaces for Web


Clients or Browsing

• List of options presented to the users called


menus that lead the user through the
formulation of a request
• No need to memorize the specific command
or syntax of a query language
• Query is composed step-by-step by picking
options from a menu that is displayed by the
system such as pull down menus.
15

Database Manageme
nt Systems
16

Database Manageme
nt Systems

Form-Based Interfaces
• Displays a form to each user
• Fill the entries in the form (entering or
retrieving data)
• Designed for Naïve users as interfaces to
canned transactions
• Forms specification languages (SQL*
forms, Oracle Forms) help programmers
to specify such forms
17

Database Manageme Toqir Ahmad


nt Systems Rana
18

Database Manageme
nt Systems

Graphical User Interfaces

• Displays a schema to user in


diagrammatic form
• Specify the query by manipulating the
diagram
• Utilizes both menus and forms
• Uses the pointing device
19

Database Manageme
nt Systems
20

Database Manageme
nt Systems

Natural Language Interfaces


• Accepts request written in English
• Attempt to understand the request
• Has its own schema
• Include dictionary important words
• Produces the high-level query and
submitted to the DBMS
21

Database Manageme
nt Systems

Speech Input and Output


• Limited use of speech as an input query
and speech as an answer to a question or
result of a request is becoming
commonplace.
• Applications with limited vocabulary such
as telephone directory, flight
arrival/departure, and bank account
information are allowing speech for input
and output to enable ordinary folks to
access this information.
22

Database Manageme
nt Systems
23

Database Manageme
nt Systems

Interfaces for Parametric Users


• Small steps of operations which have to
perform repeatedly i.e., Bank tellers
• Design some special interface for these
users by analysts and programmer
• Small set of abbreviated commands
• Proceed with a minimal number of
keystrokes (function keys)
24

Database Manageme
nt Systems

Interfaces for the DBA


• Most database systems contain privileged
commands that can be used only by the
DBA's staff.
• Creating accounts, granting authorizations
• Setting system parameters
• Changing schemas or access path
25

Database Manageme Toqir Ahmad


nt Systems Rana

Classification of DBMS
• Data model(RDBMS, OODB, Hierarchical,
network models)
• Number of users(single user and multi
user)
• Cost of DBMS(low, medium and high)
• Number of sites (centralized and
distributed)
• Types of access path

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy