SlideShare a Scribd company logo
Database
Management Systems (DBMS)
Semester : 2nd Semester
Subject Code : 20MCA21
Staff Name : Manjunatha HT
Asst.Prof
2
DATA ???????
DATA
3
Information
4
5
INTRODUCTION TO BASIC CONCEPTS OF DATABASE
SYSTEMS:
What is Data?
The raw facts are called as data. The word “raw” indicates that they have not been
processed.
Ex: For example 89 is the data. Ex: Text ,Images and videos
What is information?
The processed data is known as information.
Ex: Marks: 89; then it becomes information.
What is Knowledge?
1. Knowledge refers to the practical use of information.
2. Knowledge necessarily involves a personal experience.
DATA/INFORMATION PROCESSING:
The process of converting the data (raw facts) into meaningful information is called as
data/information processing.
What is data base ??
A database is a collection of related data.
(OR)
A database is a collection of information that is organized so that it can be easily
accessed, managed and updated
.
8
DATABASE:
.
Examples
1. Banking: For customer information, accounts, and loans, and banking
transactions.
2. Airlines: For reservations and schedule information, travel history
Other examples
3. Credit Card Transactions:
4. Finance
5. Manufacturing
5. Human Resource
6.E-Comerce
10
DBMS ?????
11
What is DBMS (database management system)
•A database management system (DBMS) is a collection of programs that enables
users to create and maintain a database.
•The DBMS is a general-purpose software system that facilitates the processes of
defining, constructing, manipulating, and sharing databases among various users
and applications.
•Defining a database involves specifying the data types, structures, and constraints
of the data to be stored in the database.
12
13
DB+ DBMS=Database system
The differences between DB approach and traditional file system
approach
14
• Self-describing nature of a database system
• Insulation between programs and data
• Data Abstraction:
• Support of multiple views of the data:
• Sharing of data and multiuser transaction processing
15
Main Characteristics of the Database Approach
16
Main Characteristics of the Database Approach
• Self-describing nature of a database system: A DBMS catalog stores the
description of the database. The description is called meta-data). This
allows the DBMS software to work with different databases.
Description of DB: Name of the tables, data type , size etc
17
Main Characteristics of the Database Approach
•Insulation between programs and data: Called program-data
independence. Allows changing data storage structures and operations
without having to change the DBMS access programs.
18
Data Abstraction: A data model is used to hide storage
details and present the users with a conceptual view of
the database.
Support of multiple views of the data: Each user have a
different view of the database, which describes only the
data of interest to that user.
19
• Sharing of data and multiuser transaction processing :
• Allowing a set of concurrent users to retrieve and to update
the database.
• Concurrency control within the DBMS guarantees that each
transaction is correctly executed or completely aborted.
• OLTP (Online Transaction Processing) is a major part of
database applications.
20
Main Characteristics of the Database Approach
21
DB USERS
• DB users may be divided into
1. Actors on the scene: Those who actually use and control the
database content, Those who design and develop the
database applications
2. Workers behind the scene: Those who design and develop the
DBMS software and related tools
22
23
Actors on the Scene(DBMS users) :
There are many types of users who are related to DBMS . These are:
a) DBA (Database Administrator): responsible for authorizing access to the database, for
co-ordinating and monitoring its use, acquiring software, and hardware resources, controlling its use
and monitoring efficiency of operations. software and hardware resources as needed.
b) Database Designer: responsible to define the content, the structure, the constraints, and
functions or transactions against the database. They must communicate with the end-users and
understand their needs..
c) End-users: they use the data for queries, reports and some of them actually update the
database content.
24
c) End Users: These are:
1) Casual Users: These are the users who communicate with the database for little period
of time. They are occasionally used the database. So these are the temporary users.
2) Parametric Or Naive Users: These are the users who communicate with the database for
a regular period. Their main job is to constantly querying and updating the database
using standard queries , this is called Canned Transaction.
3) Sophisticated End Users: These are engineers, scientists, business analysts who are
familiarize with the database and when they want to use the database, they used it regularly
and when they don’t want then they are temporally used .
4) Stand alone users: These are the users who maintain their personal database using ready
made software which is available in the market easily and provide the menu-based interface
through which they can easily used the database.
25
d) System Analysts and Application Programmers:
(Software Engineers) System analysts fulfills requirements of parametric and end
users and develop all the analysis for canned transaction through which they can
meet all the requirements of parametric users. Application programmers
implement these analysis as programs. These are especially Software
engineers.
26
Workers behind the Scene
DBMS system designers and implementers design and implement the DBMS modules
and interfaces as a software package. Package includes catalog, query language
processing, interface processing, controlling concurrency, and handling data recovery and
security.
27
The DBMS must interface with other system software such as the operating system and
compilers for various programming languages.
Tool developers : Tools are optional packages that are often purchased
separately. They include packages for database design, performance
monitoring, graphical interfaces, prototyping, simulation,
28
Operators and maintenance personnel (system administration
personnel) are responsible for the actual running and maintenance of the
hardware and software environment for the database system.
Although these categories of workers behind the scene are
instrumental in making the database system available to end users, they
typically do not use the database contents for their own purposes.
29
Advantages of using DBMS approach
Using a DBMS to manage data has many advantages:
Providing Backup and Recovery:
•A DBMS must provide facilities for recovering from hardware or software failures.
•The backup and recovery subsystem of the DBMS is responsible for recovery. For example, if
the computer system fails in the middle of a complex update transaction,
•The recovery subsystem is responsible for making sure that the database is restored to the
state
Data Independence:
•Application programs should be as independent as possible from the
storage(data). The DBMS can provide an abstract view of the data to insulate
application code from such details.
30
Efficient Data Access:
•A DBMS utilizes a variety of sophisticated techniques to store and retrieve data
efficiently. This feature is especially important if the data is stored on external
storage devices.
Data Integrity and Security:
•If data is always accessed through the DBMS, the DBMS can enforce integrity
constraints on the data. For example, before inserting salary information for an
employee, the DBMS can check that the department budget is not exceeded. Also,
the DBMS can enforce access controls that govern what data is visible to different
classes of users.
31
Concurrent Access and Crash Recovery:
•A database system allows several users to access the database concurrently.
Data Administration:
•Controlling an monitoring the DB.
•Coordinating & controlling the different types of users with DB
Avoids un authorized accesses
.DBA is responsible for avoiding un authorized accesses
Complex relationship among the data
A database may include numerous varieties of data that are interrelated in many
ways.
32
Reduced Application Development Time:
•DBMS supports many important functions that are common to many applications
easily ad quickly accessing data stored in the DBMS.
.
Providing Multiple User Interfaces:
• DBMS should provide a variety of user interfaces.
•These include query languages for casual users, programming language interfaces
for application programmers, forms and command codes for parametric users, and
menu-driven interfaces for standalone users.
33
Disadvantages of a DBMS
The disadvantages of the database approach are summarized as follows:
•Danger of an Overkill: For small and simple applications for single users a database system is
often not advisable.
•Size:, occupying many megabytes of disk space and requiring substantial amounts of memory to
run efficiently.
•Complexity: A database system creates additional complexity and requirements. Many users are
using single DB then databases is quite costly and demanding.
•Qualified Personnel: The professional operation of a database system requires appropriately
trained staff. Without a qualified database administrator nothing will work for long
34
•Higher impact of a failure: The centralization of resources increases the
vulnerability of the system.
.
35
DBMS data models
Some of the Data Models in DBMS
are:
1.Hierarchical Model
2.Network Model
3.Entity-Relationship Model
4.Relational Model
5.Object-Oriented Data Model
Data Model: A set of concepts to describe the structure of a
database, and certain constraints that the database should
obey
Structure of DB are size ,data type used ,number of tuples
36
Hierarchical Model
Hierarchical Model was the first DBMS model. This model organizes the data in the hierarchical tree
structure. The hierarchy starts from the root which has root data and then it expands in the form of a
tree adding child node to the parent node. This model easily represents some of the real-world
relationships like food recipes, sitemap of a website etc. Example: We can represent the
relationship between the shoes present on a shopping website in the following way:
37
Network Model
This model is an extension of the hierarchical model. It was the most popular model before the
relational model. This model is the same as the hierarchical model, the only difference is that a
record can have more than one parent. It replaces the hierarchical tree with a graph. Example: In
the example below we can see that node student has two parents i.e. CSE Department and Library.
This was earlier not possible in the hierarchical model.
38
Entity-Relationship Model
Entity-Relationship Model or simply ER Model is a high-level data model diagram. In this model, we
represent the real-world problem in the pictorial form to make it easy for the stakeholders to
understand. It is also very easy for the developers to understand the system by just looking at the
ER diagram. We use the ER diagram as a visual tool to represent an ER Model. ER diagram has
the following three components:
• Entities: Entity is a real-world thing. It can be a person, place, or even a
concept. Example: Teachers, Students, Course, Building, Department, etc are some of the
entities of a School Management System.
•Attributes: An entity contains a real-world property called attribute. This is the characteristics of
that attribute. Example: The entity teacher has the property like teacher id, salary, age, etc.
•Relationship: Relationship tells how two entities are related. Example: Teacher works for a
department.
39
40
Relational Model
Relational Model is the most widely used model. In this model, the data is
maintained in the form of a two-dimensional table. All the information is stored in
the form of row and columns. The basic structure of a relational model is tables. So,
the tables are also called relations in the relational model. Example: In this
example, we have an Employee table.
41
Object-Oriented Data Model
The real-world problems are more closely represented through the object-oriented
data model. In this model, both the data and relationship are present in a single
structure known as an object. We can store audio, video, images, etc in the
database which was not possible in the relational model(although you can store
audio and video in relational database, it is advice not to store in the relational
database). In this model, two are more objects are connected through links. We
use this link to relate one object to other objects.
42
This can be understood by the example given below.
In the above example, we have two objects Employee and Department. All the data and relationships of each
object are contained as a single unit. The attributes like Name, Job_title of the employee and the methods
which will be performed by that object are stored as a single object. The two objects are connected through a
common attribute i.e the Department_id and the communication between these two will be done with the help
of this common id.
43
schemas and instances
Instances :
Instances are the collection of information stored at a particular moment.
Example –
Let’s say a table name teacher in our database, suppose the table has 50 records so the instance of
the database has 50 records for now and tomorrow we are going to add another fifty records so
tomorrow the instance have total 100 records. This is called an instance.
What is the Instance? If we look towards it in real life, we
refer instance as an occurrence of something at a particular moment
of time.. The collection of information stored in the database at a
particular moment is called an instance of the database.
44
Schemas
What is Schema? In the database management system, the overall design of the
database is called the database schema. Schema gets changed rarely, and if so,
changes altogether. A database schema corresponds to the variable declarations
together with associated type definitions in a program.
Types of databse schemas
There are several schemas in a Database system that is partitioned depending on
the levels of abstraction:
45
a.Physical Schema
The physical schema describes the database design at the physical level.
a.Logical Schema
The logical schema describes the database design at the logical level.
46
The physical schema is hidden beneath the logical schema, and it can be changed
easily without affecting the application programs.
Including these, in a database, there are several schemas present at the view level
and called subschemas that describe different views of the database.
By far, the logical schema is the most important among all schemas due to its
tremendous effect on application programs, as the programmers construct
applications by using the logical schema.
• Example for schema
• Database: College
Staff(Name: Varchar ; Designation : Char ;Experience :Char)
Student( Name : Char ; USN: varchar ; Course: Char)
47
48
SCHEMA INSTANCE
It is the overall description of
the database.
It is the collection of information
stored in a database at a
particular moment.
Schema is same for whole
database.
Data in instances can be
changed using addition,
deletion, updation.
Does not change Frequently. Changes Frequently.
Defines the basic structure of
the database i.e how the data
will be stored in the database.
It is the set of Information
stored at a particular time.
Difference between Schema and Instance :
49
Three -schema architecture and data independence
Three of the four important characteristics of the database approach, are
(1)use of a catalog to store the database description (schema) so as to make
it self-describing,
(2)insulation of programs and data (program-data and program-operation
independence), and
(3)support of multiple user views. In this section we specify an architecture
for database systems, called the three-schema architecture, that was
proposed to help achieve and visualize these characteristics.
50
Three schema Architecture
•The three schema architecture is also called ANSI/SPARC
architecture or three-level architecture.
•This framework is used to describe the structure of a specific
database system.
•The three schema architecture is also used to separate the user
applications and physical database.
•The three schema architecture contains three-levels. It breaks
the database down into three different categories.
51
The three-schema architecture is as follows:
52
In the above diagram:
•It shows the DBMS architecture.
•Mapping is used to transform the request and response between
various database levels of architecture.
•Mapping is not good for small DBMS because it takes more time.
•In External / Conceptual mapping, it is necessary to transform the
request from external level to conceptual schema.
•In Conceptual / Internal mapping, DBMS transform the request from
the conceptual to internal level.
1. Internal Level (Internal schema)
•The internal level has an internal schema which describes the physical storage structure of the
database.
•The internal schema is also known as a physical schema.
•It uses the physical data model. It is used to define that how the data will be stored in a block.
•The physical level is used to describe complex low-level data structures in detail.
2. Conceptual Level (Conceptual schema)
•The conceptual schema describes the design of a database at the conceptual level. Conceptual
level is also known as logical level.
•The conceptual schema describes the structure of the whole database.
•The conceptual level describes what data are to be stored in the database and also describes
what relationship exists among those data.
•In the conceptual level, internal details such as an implementation of the data structure are
hidden.
•Programmers and database administrators work at this level.
3. External Level (External schema)
•At the external level, a database contains several schemas that
sometimes called as subschema. The subschema is used to describe
the different view of the database.
•An external schema is also known as view schema.
•Interested part of the database is viewed by the user
•The view schema describes the end user interaction with database
systems.
56
Data Independence
•Data independence can be explained using the three-schema architecture.
•Data independence tells about modify the schema at one level of the database
system without altering the schema at the next higher level.
There are two types of data independence:
58
1. Logical Data Independence
•Logical data independence refers characteristic of being able to change the
conceptual schema without having to change the external schema.
•Logical data independence is used to separate the external view from the
conceptual view.
•If we do any changes in the conceptual view of the data, then the user view of the
data would not be affected.
59
2. Physical Data Independence
2. Physical Data Independence
•Physical data independence can be defined as
the capacity to change the internal schema
without having to change the conceptual
schema.
•If we do any changes in the storage size of the
database system server, then the Conceptual
structure of the database will not be affected.
•Physical data independence is used to
separate conceptual levels from the internal
levels.
•Physical data independence occurs at the
logical interface level.
Database languages and interfaces
62
• Database Language
• A DBMS has appropriate languages and interfaces to express database queries
and updates.
• Database languages can be used to read, store and update the data in the
database.
1. Data Definition Language
•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.
•Used by the DBA and database designers to specify the conceptual schema of a
database.
Here are some tasks that come under DDL:
•Create: It is used to create objects in the database.
•Alter: It is used to alter the structure of the database.
•Drop: It is used to delete objects from the database.
•Truncate: It is used to remove all records from a table.
•Rename: It is used to rename an object.
• The DDL is used to specify the conceptual schema only.
Another language, the storage definition language (SDL), is
used to specify the internal schema.
• View definition language (VDL), to specify user view
64
2. Data Manipulation Language
• DML stands for Data Manipulation Language. 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.
• Merge: It performs UPSERT operation, i.e., insert or update operations.
• Lock Table: It controls concurrency.
• High Level or Non-procedural Languages: e.g., SQL, are set-
oriented and specify what data to retrieve than how to
retrieve. Also called declarative languages.
• Low Level or Procedural Languages: record-at-a-time; they
specify how to retrieve data and include constructs such as
looping.
66
3. Data Control Language
•DCL stands for Data Control Language. It is used to
retrieve the stored or saved data.
•Example commands
•R Grant: It is used to give access privileges to the user to
accesses the database.
•Revoke: It is used to take back permissions from the user.
4. Transaction Control Language
TCL is used to run the changes made by the DML statement.
TCL can be grouped into a logical transaction.
Here are some tasks that come under TCL:
•Commit: It is used to save the transaction on the
database.
•Rollback: It is used to restore the database to original
since the last Commit.
INTERFACES
1. Menu-Based Interfaces for Browsing ,These interfaces present
the user with lists of options, called menus,
No need to memorize the specific commands and syntax of a
query language; rather, the query is composed step by step by
picking options from a menu that is displayed by the system.
Pull-down menus are becoming a very popular technique in
window-based user interfaces.
69
2. Forms-Based Interfaces –
A forms-based interface displays a form to each user. Users can fill out all of
the form entries to insert a new data, or they can fill out only certain entries
Example: SQL * Forms is a form-based language that specifies queries using a
form.
3. Graphical User Interface –
A GUI typically displays a schema to the user in diagrammatic form. The user
then can specify a query by manipulating the diagram. In many cases, GUI’s
utilize both menus and forms. Most GUIs use a pointing device such as mouse, to
pick certain part of the displayed schema diagram.
4. Natural language Interfaces –
These interfaces accept request written in English or some other language and
attempt to understand them.
5. Speech Input and Output –
Takes .the input in the form of speech ,analyze the speech with already
predefined words and produces the output
6. Interfaces for DBA –
. These include commands for creating accounts,, granting account
authorization, changing a schema, reorganizing the storage structures of a
databases.
Database System Environment
A DBMS is a complex software system. In this section we discuss the types of soft-ware
components that constitute a DBMS
1. DBMS Component Modules
Figure illustrates, in a simplified form, the typical DBMS components. The figure is
divided into two parts.
1. The top part of the figure refers to the various users of the database environment and
their interfaces.
2. The lower part shows the internals of the DBMS responsible for storage of data and
processing of transactions.
Introduction to DBMS.pptx
Let us consider the top part of Figure, It shows interfaces for the
DBA staff,
Casual users: who work with interactive interfaces to formulate queries,
Application programmers: who create programs using some host
programming languages, and parametric users who do data entry work by
supplying parameters to canned transactions.
The DBA staff works on defining the database and tuning it by making
changes to its definition using the DDL and other privileged commands.
1 DBMS COMPONENT MODULE
1 DBMS COMPONENT MODULE
• In the lower part of Figure,
• DDL compiler :Process schema definitions and compile the DDL
statement and stores in the catalog
• Query Compiler :handles the high level queries
• Query Optimizer : Accesses the query in the faster level
• Precompiled : Extracts the DML commands from application program
• DML Compiler :Converts DML commands into object code for access
to the database 76
1 DBMS COMPONENT MODULE
• Run time database processor : Handles the database accesses at run time it executes
the following
(1) the privileged commands,
(2) Normal executable queries
(3) the canned transactions with runtime parameters.
• It works with system catalog and stored data manager ,It also responsible for
concurrency control and backup and recovery systems
• Stored Data manager : Data Transfer between disk and main memory
77
2. Database System Utilities
In addition to possessing the software modules just described, most DBMSs
have database utilities that help the DBA manage the database system.
Common utilities have the following types of functions:
Loading. A loading utility is used to load existing data files—such as text files
or sequential files—into the database. Usually, the current (source) format of
the data file and the desired (target) database file structure are specified to the
utility.
Backup. A backup utility creates a backup copy of the database, usually
by dumping the entire database onto tape or other mass storage medium. The
backup copy can be used to restore the database in case of catastrophic disk
failure.
Database storage reorganization. This utility can be used to reorganize a
set of database files into different file organizations, and that improves the
performance.
Performance monitoring. Such a utility monitors database usage and
provides statistics to the DBA. The DBA uses the statistics in making
decisions such as whether or not to reorganize files
3. Tools, Application Environments, and Communications Facilities
CASE tools are used in the design phase of database systems. Another tool
that can be quite useful in large organizations is an expanded data
dictionary (or data repository) system.
Application development environments, such as PowerBuilder (Sybase)
or JBuilder (Borland), have been quite popular. These systems provide an
environment for developing database applications and include facilities like
GUI development, querying and updating, and application program
development.
The DBMS should have communications software, whose function is
to allow users to accesses the remote database through computer terminals,
workstations, or personal computers.
Centralized and Client/Server Architectures for DBMSs
1. Centralized DBMSs Architecture
Centralized DBMS:
a) Merge everything into single system including- Hardware, DBMS software,
application programs, and user interface processing software.
b) User can still connect by a remote terminal – but all processing is done at
centralized site.
Physical Centralized Architecture:
Architectures for DBMS have pursued trends similar to those generating computer system
architectures. Earlier architectures utilized mainframes computers to provide the main processing for
all system functions including user application programs as well as user interface programs as well all
DBMS functionality.
The reason was that the majority of users accessed such systems via computer terminals that did
not have processing power and only provided display capabilities. Thus all processing was performed
remotely on the computer system and only display information and controls were sent from the
computer to the display terminals which were connected to central computer via a variety of types of
communication networks.
As prices of hardware refused most users replaced their terminals with PCs and workstations. At
first database systems utilized these computers similarly to how they have used is play terminals so
that DBMS itself was still a Centralized DBMS in which all the DBMS functionality application program
execution and user interface processing were carried out on one Machine.
Basic 2-tier Client-Server Architectures:
Specialized Servers with Specialized functions
• Print server
• File server
• DBMS server
• Web server
• Email server
Clients are able to access the specialized servers as needed
Logical two-tier client server architecture:
Clients:
• Offer appropriate interfaces through a client software module to access as well as utilize the various
server resources.
• Connected to the servers by means of some form of a network.
• (LAN- local area network, wireless network and so on.)
DBMS Server:
• Provides database query as well as transaction services to the clients
• Relational DBMS servers are habitually called query servers, SQL servers, or transaction servers
• Applications running on clients use an Application Program Interface (API) to access server
databases via standard interface such as:
ODBC- Open Database Connectivity standard
JDBC- for Java programming access
Two Tier Client-Server Architecture:
a) A client program may perhaps connect to several DBMSs sometimes called the
data sources.
b) In general data sources are able to be files or other non-DBMS software that
manages data. Other variations of clients are likely- example in some object
DBMSs more functionality is transferred to clients including data dictionary
functions, optimization as well as recovery across multiple servers etc.
Three Tier Client-Server Architecture:
a) Common for Web applications.
b) Intermediate Layer entitled Application Server or Web Server.
c) Stores the web connectivity software as well as the business logic part of the application used to
access the corresponding data from the database server.
d) Acts like a conduit for sending moderately processed data between the database server and the
client.
e) Three-tier Architecture is able to Enhance Security:
• Database server merely accessible via middle tier.
• Clients can’t directly access database server.
Classification of Database Management Systems
Database management systems can be classified based on several criteria,
such as the data model, user numbers and database distribution, all described
below.
Classification Based on Data Model
The most popular data model in use today is the relational data model. Well-
known DBMSs like Oracle, MS SQL Server, DB2 and MySQL support this model.
Other traditional models, such as hierarchical data models and network data
models, are still used in industry mainly on mainframe platforms. However, they
are not commonly used due to their complexity. These are all referred to
as traditional models because they preceded the relational model.
Classification Based on User Numbers
A DBMS can be classification based on the number of users it supports. It can be
a single-user database system, which supports one user at a time, or a multiuser
database system, which supports multiple users concurrently.
Classification Based on DatabaseDistribution
There are four main distribution systems for database systems and these, in
turn, can be used to classify the DBMS.
4. Heterogeneous distributed database systems
1. Centralized systems
2. Distributed database system
3. Homogeneous distributed database
systems
1. Centralized systems
With a centralized database system, the DBMS and database are stored at a
single site that is used by several other systems too. This is illustrated in Figure
Figure . Example of a centralized database system
In the early 1980s, many Canadian libraries used the GEAC 8000 to convert their
manual card catalogues to machine-readable centralized catalogue systems. Each
book catalogue had a barcode field similar to those on supermarket products.
2. Distributed database system
In a distributed database system, the actual database and the DBMS software are
distributed from various sites that are connected by a computer network, as shown
in Figure
3. Homogeneous distributed database systems
Homogeneous distributed database systems use the same DBMS software from
multiple sites. Data exchange between these various sites can be handled easily.
For example, library information systems by the same vendor, such as Geac
Computer Corporation, use the same DBMS software which allows easy data
exchange between the various Geac library sites.
4. Heterogeneous distributed database systems
In a heterogeneous distributed database system, different sites might use different
DBMS software, but there is additional common software to support data exchange
between these sites. For example, the various library database systems use the
same machine-readable cataloguing (MARC) format to support library record data
exchange.
94
EXAMPLE FOR SCHEMA
95
Example for Instances
96
97
Three schema Architecture example
98
Form based interface
99
Menu based interfaces
100
GUI Interfaces
101
102
103
Hierarchical Data model
104
Network model
105
Object oriented model
106
End of Module 01
107

More Related Content

PPTX
Adbms 11 object structure and type constructor
Vaibhav Khanna
 
PPTX
Relational Database Design
Archit Saxena
 
PPTX
object oriented methodologies
Amith Tiwari
 
PDF
Introduction to Database Management System
Amiya9439793168
 
DOC
rdbms-notes
Mohit Saini
 
PPTX
Relational Data Model Introduction
Nishant Munjal
 
PPT
Data models
Usman Tariq
 
PPTX
Database management system
Shashikumar_chari
 
Adbms 11 object structure and type constructor
Vaibhav Khanna
 
Relational Database Design
Archit Saxena
 
object oriented methodologies
Amith Tiwari
 
Introduction to Database Management System
Amiya9439793168
 
rdbms-notes
Mohit Saini
 
Relational Data Model Introduction
Nishant Munjal
 
Data models
Usman Tariq
 
Database management system
Shashikumar_chari
 

What's hot (20)

PPT
Database and Database Management (DBM): Health Informatics
Zulfiquer Ahmed Amin
 
PPT
Quality Management in Software Engineering SE24
koolkampus
 
PPTX
Metadata ppt
Shashikant Kumar
 
PPTX
Advantages and disadvantages of relational databases
SanthiNivas
 
PPTX
Structured Query Language (SQL).pptx
EllenGracePorras
 
PPT
20.SCHEDULES.ppt
AkhilNameirakpam
 
PPTX
Entity Relationship Diagrams
sadique_ghitm
 
ODP
ER Model in DBMS
Kabindra Koirala
 
PDF
Introduction to Database Management Systems: Structure, Applications, and Key...
Mahmud Hasan Tanvir
 
PPTX
Normalization of Data Base
Ravinder Kamboj
 
PDF
Database Normalization
Arun Sharma
 
PPTX
8 drived horizontal fragmentation
Mohsan Ijaz
 
PPTX
Web Mining & Text Mining
Hemant Sharma
 
PPT
Uml - An Overview
Raj Thilak S
 
PPTX
data abstraction in DBMS
BHARATH KUMAR
 
PPTX
Normalization
Wangu Thupa
 
PPT
Introduction to Rational Rose
Munaam Munawar
 
PPT
Data independence
Aashima Wadhwa
 
PPTX
Dbms slides
rahulrathore725
 
Database and Database Management (DBM): Health Informatics
Zulfiquer Ahmed Amin
 
Quality Management in Software Engineering SE24
koolkampus
 
Metadata ppt
Shashikant Kumar
 
Advantages and disadvantages of relational databases
SanthiNivas
 
Structured Query Language (SQL).pptx
EllenGracePorras
 
20.SCHEDULES.ppt
AkhilNameirakpam
 
Entity Relationship Diagrams
sadique_ghitm
 
ER Model in DBMS
Kabindra Koirala
 
Introduction to Database Management Systems: Structure, Applications, and Key...
Mahmud Hasan Tanvir
 
Normalization of Data Base
Ravinder Kamboj
 
Database Normalization
Arun Sharma
 
8 drived horizontal fragmentation
Mohsan Ijaz
 
Web Mining & Text Mining
Hemant Sharma
 
Uml - An Overview
Raj Thilak S
 
data abstraction in DBMS
BHARATH KUMAR
 
Normalization
Wangu Thupa
 
Introduction to Rational Rose
Munaam Munawar
 
Data independence
Aashima Wadhwa
 
Dbms slides
rahulrathore725
 
Ad

Similar to Introduction to DBMS.pptx (20)

PPTX
DBMS-INTRODUCTION.pptx
DivyaKS12
 
PPTX
Introduction to DBMS.pptx
Sreenivas R
 
PPTX
Unit1 dbms
gowrivageesan87
 
PDF
dbms Lesson for the Engineering students.pdf
hpndegreecollegesklm
 
PDF
DBMS_UNIT_1.pdf
Koteswari Kasireddy
 
PPTX
Introduction to Database and database users.pptx
HajarMeseehYaseen
 
PPTX
Introduction to Data Base Management System.pptx
SandeepY10
 
PPTX
Chapter1
Jafar Nesargi
 
PDF
Unit 1: Introduction to DBMS Unit 1 Complete
Raj vardhan
 
PDF
1-introduction to DB.pdf
MuniraALmogren
 
PPTX
Data base chapter 2 | detail about the topic
hoseg78377
 
PPTX
Cp 121 lecture 01
ITNet
 
PPT
Introduction & history of dbms
sethu pm
 
PPT
En ch01
anibapi
 
PPT
20MCA21_Module1.ppt
AshokBP1
 
PPTX
Components and Advantages of DBMS
Shubham Joon
 
PPTX
DATABASE MANAGEMENT SYSTEMS_module1.pptx
gayathri9256
 
PPT
Chapte sdfbjsvfjsb shdvgsfjsdhvshyjhscdgppt
ridmoon40318
 
PPTX
CP 121_2.pptx about time to be implement
flyinimohamed
 
PPTX
Adbms 3 main characteristics of the database approach
Vaibhav Khanna
 
DBMS-INTRODUCTION.pptx
DivyaKS12
 
Introduction to DBMS.pptx
Sreenivas R
 
Unit1 dbms
gowrivageesan87
 
dbms Lesson for the Engineering students.pdf
hpndegreecollegesklm
 
DBMS_UNIT_1.pdf
Koteswari Kasireddy
 
Introduction to Database and database users.pptx
HajarMeseehYaseen
 
Introduction to Data Base Management System.pptx
SandeepY10
 
Chapter1
Jafar Nesargi
 
Unit 1: Introduction to DBMS Unit 1 Complete
Raj vardhan
 
1-introduction to DB.pdf
MuniraALmogren
 
Data base chapter 2 | detail about the topic
hoseg78377
 
Cp 121 lecture 01
ITNet
 
Introduction & history of dbms
sethu pm
 
En ch01
anibapi
 
20MCA21_Module1.ppt
AshokBP1
 
Components and Advantages of DBMS
Shubham Joon
 
DATABASE MANAGEMENT SYSTEMS_module1.pptx
gayathri9256
 
Chapte sdfbjsvfjsb shdvgsfjsdhvshyjhscdgppt
ridmoon40318
 
CP 121_2.pptx about time to be implement
flyinimohamed
 
Adbms 3 main characteristics of the database approach
Vaibhav Khanna
 
Ad

Recently uploaded (20)

PPTX
Command Palatte in Odoo 18.1 Spreadsheet - Odoo Slides
Celine George
 
PPTX
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
PPTX
How to Apply for a Job From Odoo 18 Website
Celine George
 
PPTX
An introduction to Dialogue writing.pptx
drsiddhantnagine
 
PPTX
Five Point Someone – Chetan Bhagat | Book Summary & Analysis by Bhupesh Kushwaha
Bhupesh Kushwaha
 
PPTX
CDH. pptx
AneetaSharma15
 
PDF
Antianginal agents, Definition, Classification, MOA.pdf
Prerana Jadhav
 
PPTX
Measures_of_location_-_Averages_and__percentiles_by_DR SURYA K.pptx
Surya Ganesh
 
DOCX
pgdei-UNIT -V Neurological Disorders & developmental disabilities
JELLA VISHNU DURGA PRASAD
 
PPTX
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
PDF
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
Nguyen Thanh Tu Collection
 
PPTX
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
PDF
Review of Related Literature & Studies.pdf
Thelma Villaflores
 
PPTX
Artificial-Intelligence-in-Drug-Discovery by R D Jawarkar.pptx
Rahul Jawarkar
 
DOCX
Modul Ajar Deep Learning Bahasa Inggris Kelas 11 Terbaru 2025
wahyurestu63
 
PDF
Virat Kohli- the Pride of Indian cricket
kushpar147
 
PDF
The-Invisible-Living-World-Beyond-Our-Naked-Eye chapter 2.pdf/8th science cur...
Sandeep Swamy
 
PPTX
Tips Management in Odoo 18 POS - Odoo Slides
Celine George
 
PPTX
family health care settings home visit - unit 6 - chn 1 - gnm 1st year.pptx
Priyanshu Anand
 
PPTX
Cleaning Validation Ppt Pharmaceutical validation
Ms. Ashatai Patil
 
Command Palatte in Odoo 18.1 Spreadsheet - Odoo Slides
Celine George
 
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
How to Apply for a Job From Odoo 18 Website
Celine George
 
An introduction to Dialogue writing.pptx
drsiddhantnagine
 
Five Point Someone – Chetan Bhagat | Book Summary & Analysis by Bhupesh Kushwaha
Bhupesh Kushwaha
 
CDH. pptx
AneetaSharma15
 
Antianginal agents, Definition, Classification, MOA.pdf
Prerana Jadhav
 
Measures_of_location_-_Averages_and__percentiles_by_DR SURYA K.pptx
Surya Ganesh
 
pgdei-UNIT -V Neurological Disorders & developmental disabilities
JELLA VISHNU DURGA PRASAD
 
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
BÀI TẬP TEST BỔ TRỢ THEO TỪNG CHỦ ĐỀ CỦA TỪNG UNIT KÈM BÀI TẬP NGHE - TIẾNG A...
Nguyen Thanh Tu Collection
 
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
Review of Related Literature & Studies.pdf
Thelma Villaflores
 
Artificial-Intelligence-in-Drug-Discovery by R D Jawarkar.pptx
Rahul Jawarkar
 
Modul Ajar Deep Learning Bahasa Inggris Kelas 11 Terbaru 2025
wahyurestu63
 
Virat Kohli- the Pride of Indian cricket
kushpar147
 
The-Invisible-Living-World-Beyond-Our-Naked-Eye chapter 2.pdf/8th science cur...
Sandeep Swamy
 
Tips Management in Odoo 18 POS - Odoo Slides
Celine George
 
family health care settings home visit - unit 6 - chn 1 - gnm 1st year.pptx
Priyanshu Anand
 
Cleaning Validation Ppt Pharmaceutical validation
Ms. Ashatai Patil
 

Introduction to DBMS.pptx

  • 1. Database Management Systems (DBMS) Semester : 2nd Semester Subject Code : 20MCA21 Staff Name : Manjunatha HT Asst.Prof
  • 5. 5
  • 6. INTRODUCTION TO BASIC CONCEPTS OF DATABASE SYSTEMS: What is Data? The raw facts are called as data. The word “raw” indicates that they have not been processed. Ex: For example 89 is the data. Ex: Text ,Images and videos What is information? The processed data is known as information. Ex: Marks: 89; then it becomes information. What is Knowledge? 1. Knowledge refers to the practical use of information. 2. Knowledge necessarily involves a personal experience.
  • 7. DATA/INFORMATION PROCESSING: The process of converting the data (raw facts) into meaningful information is called as data/information processing. What is data base ?? A database is a collection of related data. (OR) A database is a collection of information that is organized so that it can be easily accessed, managed and updated .
  • 8. 8
  • 9. DATABASE: . Examples 1. Banking: For customer information, accounts, and loans, and banking transactions. 2. Airlines: For reservations and schedule information, travel history Other examples 3. Credit Card Transactions: 4. Finance 5. Manufacturing 5. Human Resource 6.E-Comerce
  • 10. 10
  • 12. What is DBMS (database management system) •A database management system (DBMS) is a collection of programs that enables users to create and maintain a database. •The DBMS is a general-purpose software system that facilitates the processes of defining, constructing, manipulating, and sharing databases among various users and applications. •Defining a database involves specifying the data types, structures, and constraints of the data to be stored in the database. 12
  • 14. The differences between DB approach and traditional file system approach 14
  • 15. • Self-describing nature of a database system • Insulation between programs and data • Data Abstraction: • Support of multiple views of the data: • Sharing of data and multiuser transaction processing 15 Main Characteristics of the Database Approach
  • 16. 16 Main Characteristics of the Database Approach • Self-describing nature of a database system: A DBMS catalog stores the description of the database. The description is called meta-data). This allows the DBMS software to work with different databases. Description of DB: Name of the tables, data type , size etc
  • 17. 17 Main Characteristics of the Database Approach •Insulation between programs and data: Called program-data independence. Allows changing data storage structures and operations without having to change the DBMS access programs.
  • 18. 18 Data Abstraction: A data model is used to hide storage details and present the users with a conceptual view of the database.
  • 19. Support of multiple views of the data: Each user have a different view of the database, which describes only the data of interest to that user. 19
  • 20. • Sharing of data and multiuser transaction processing : • Allowing a set of concurrent users to retrieve and to update the database. • Concurrency control within the DBMS guarantees that each transaction is correctly executed or completely aborted. • OLTP (Online Transaction Processing) is a major part of database applications. 20 Main Characteristics of the Database Approach
  • 21. 21
  • 22. DB USERS • DB users may be divided into 1. Actors on the scene: Those who actually use and control the database content, Those who design and develop the database applications 2. Workers behind the scene: Those who design and develop the DBMS software and related tools 22
  • 23. 23 Actors on the Scene(DBMS users) : There are many types of users who are related to DBMS . These are: a) DBA (Database Administrator): responsible for authorizing access to the database, for co-ordinating and monitoring its use, acquiring software, and hardware resources, controlling its use and monitoring efficiency of operations. software and hardware resources as needed. b) Database Designer: responsible to define the content, the structure, the constraints, and functions or transactions against the database. They must communicate with the end-users and understand their needs.. c) End-users: they use the data for queries, reports and some of them actually update the database content.
  • 24. 24 c) End Users: These are: 1) Casual Users: These are the users who communicate with the database for little period of time. They are occasionally used the database. So these are the temporary users. 2) Parametric Or Naive Users: These are the users who communicate with the database for a regular period. Their main job is to constantly querying and updating the database using standard queries , this is called Canned Transaction. 3) Sophisticated End Users: These are engineers, scientists, business analysts who are familiarize with the database and when they want to use the database, they used it regularly and when they don’t want then they are temporally used . 4) Stand alone users: These are the users who maintain their personal database using ready made software which is available in the market easily and provide the menu-based interface through which they can easily used the database.
  • 25. 25 d) System Analysts and Application Programmers: (Software Engineers) System analysts fulfills requirements of parametric and end users and develop all the analysis for canned transaction through which they can meet all the requirements of parametric users. Application programmers implement these analysis as programs. These are especially Software engineers.
  • 26. 26 Workers behind the Scene DBMS system designers and implementers design and implement the DBMS modules and interfaces as a software package. Package includes catalog, query language processing, interface processing, controlling concurrency, and handling data recovery and security.
  • 27. 27 The DBMS must interface with other system software such as the operating system and compilers for various programming languages. Tool developers : Tools are optional packages that are often purchased separately. They include packages for database design, performance monitoring, graphical interfaces, prototyping, simulation,
  • 28. 28 Operators and maintenance personnel (system administration personnel) are responsible for the actual running and maintenance of the hardware and software environment for the database system. Although these categories of workers behind the scene are instrumental in making the database system available to end users, they typically do not use the database contents for their own purposes.
  • 29. 29 Advantages of using DBMS approach Using a DBMS to manage data has many advantages: Providing Backup and Recovery: •A DBMS must provide facilities for recovering from hardware or software failures. •The backup and recovery subsystem of the DBMS is responsible for recovery. For example, if the computer system fails in the middle of a complex update transaction, •The recovery subsystem is responsible for making sure that the database is restored to the state Data Independence: •Application programs should be as independent as possible from the storage(data). The DBMS can provide an abstract view of the data to insulate application code from such details.
  • 30. 30 Efficient Data Access: •A DBMS utilizes a variety of sophisticated techniques to store and retrieve data efficiently. This feature is especially important if the data is stored on external storage devices. Data Integrity and Security: •If data is always accessed through the DBMS, the DBMS can enforce integrity constraints on the data. For example, before inserting salary information for an employee, the DBMS can check that the department budget is not exceeded. Also, the DBMS can enforce access controls that govern what data is visible to different classes of users.
  • 31. 31 Concurrent Access and Crash Recovery: •A database system allows several users to access the database concurrently. Data Administration: •Controlling an monitoring the DB. •Coordinating & controlling the different types of users with DB Avoids un authorized accesses .DBA is responsible for avoiding un authorized accesses Complex relationship among the data A database may include numerous varieties of data that are interrelated in many ways.
  • 32. 32 Reduced Application Development Time: •DBMS supports many important functions that are common to many applications easily ad quickly accessing data stored in the DBMS. . Providing Multiple User Interfaces: • DBMS should provide a variety of user interfaces. •These include query languages for casual users, programming language interfaces for application programmers, forms and command codes for parametric users, and menu-driven interfaces for standalone users.
  • 33. 33 Disadvantages of a DBMS The disadvantages of the database approach are summarized as follows: •Danger of an Overkill: For small and simple applications for single users a database system is often not advisable. •Size:, occupying many megabytes of disk space and requiring substantial amounts of memory to run efficiently. •Complexity: A database system creates additional complexity and requirements. Many users are using single DB then databases is quite costly and demanding. •Qualified Personnel: The professional operation of a database system requires appropriately trained staff. Without a qualified database administrator nothing will work for long
  • 34. 34 •Higher impact of a failure: The centralization of resources increases the vulnerability of the system. .
  • 35. 35 DBMS data models Some of the Data Models in DBMS are: 1.Hierarchical Model 2.Network Model 3.Entity-Relationship Model 4.Relational Model 5.Object-Oriented Data Model Data Model: A set of concepts to describe the structure of a database, and certain constraints that the database should obey Structure of DB are size ,data type used ,number of tuples
  • 36. 36 Hierarchical Model Hierarchical Model was the first DBMS model. This model organizes the data in the hierarchical tree structure. The hierarchy starts from the root which has root data and then it expands in the form of a tree adding child node to the parent node. This model easily represents some of the real-world relationships like food recipes, sitemap of a website etc. Example: We can represent the relationship between the shoes present on a shopping website in the following way:
  • 37. 37 Network Model This model is an extension of the hierarchical model. It was the most popular model before the relational model. This model is the same as the hierarchical model, the only difference is that a record can have more than one parent. It replaces the hierarchical tree with a graph. Example: In the example below we can see that node student has two parents i.e. CSE Department and Library. This was earlier not possible in the hierarchical model.
  • 38. 38 Entity-Relationship Model Entity-Relationship Model or simply ER Model is a high-level data model diagram. In this model, we represent the real-world problem in the pictorial form to make it easy for the stakeholders to understand. It is also very easy for the developers to understand the system by just looking at the ER diagram. We use the ER diagram as a visual tool to represent an ER Model. ER diagram has the following three components: • Entities: Entity is a real-world thing. It can be a person, place, or even a concept. Example: Teachers, Students, Course, Building, Department, etc are some of the entities of a School Management System. •Attributes: An entity contains a real-world property called attribute. This is the characteristics of that attribute. Example: The entity teacher has the property like teacher id, salary, age, etc. •Relationship: Relationship tells how two entities are related. Example: Teacher works for a department.
  • 39. 39
  • 40. 40 Relational Model Relational Model is the most widely used model. In this model, the data is maintained in the form of a two-dimensional table. All the information is stored in the form of row and columns. The basic structure of a relational model is tables. So, the tables are also called relations in the relational model. Example: In this example, we have an Employee table.
  • 41. 41 Object-Oriented Data Model The real-world problems are more closely represented through the object-oriented data model. In this model, both the data and relationship are present in a single structure known as an object. We can store audio, video, images, etc in the database which was not possible in the relational model(although you can store audio and video in relational database, it is advice not to store in the relational database). In this model, two are more objects are connected through links. We use this link to relate one object to other objects.
  • 42. 42 This can be understood by the example given below. In the above example, we have two objects Employee and Department. All the data and relationships of each object are contained as a single unit. The attributes like Name, Job_title of the employee and the methods which will be performed by that object are stored as a single object. The two objects are connected through a common attribute i.e the Department_id and the communication between these two will be done with the help of this common id.
  • 43. 43 schemas and instances Instances : Instances are the collection of information stored at a particular moment. Example – Let’s say a table name teacher in our database, suppose the table has 50 records so the instance of the database has 50 records for now and tomorrow we are going to add another fifty records so tomorrow the instance have total 100 records. This is called an instance. What is the Instance? If we look towards it in real life, we refer instance as an occurrence of something at a particular moment of time.. The collection of information stored in the database at a particular moment is called an instance of the database.
  • 44. 44 Schemas What is Schema? In the database management system, the overall design of the database is called the database schema. Schema gets changed rarely, and if so, changes altogether. A database schema corresponds to the variable declarations together with associated type definitions in a program. Types of databse schemas There are several schemas in a Database system that is partitioned depending on the levels of abstraction:
  • 45. 45 a.Physical Schema The physical schema describes the database design at the physical level. a.Logical Schema The logical schema describes the database design at the logical level.
  • 46. 46 The physical schema is hidden beneath the logical schema, and it can be changed easily without affecting the application programs. Including these, in a database, there are several schemas present at the view level and called subschemas that describe different views of the database. By far, the logical schema is the most important among all schemas due to its tremendous effect on application programs, as the programmers construct applications by using the logical schema.
  • 47. • Example for schema • Database: College Staff(Name: Varchar ; Designation : Char ;Experience :Char) Student( Name : Char ; USN: varchar ; Course: Char) 47
  • 48. 48 SCHEMA INSTANCE It is the overall description of the database. It is the collection of information stored in a database at a particular moment. Schema is same for whole database. Data in instances can be changed using addition, deletion, updation. Does not change Frequently. Changes Frequently. Defines the basic structure of the database i.e how the data will be stored in the database. It is the set of Information stored at a particular time. Difference between Schema and Instance :
  • 49. 49 Three -schema architecture and data independence Three of the four important characteristics of the database approach, are (1)use of a catalog to store the database description (schema) so as to make it self-describing, (2)insulation of programs and data (program-data and program-operation independence), and (3)support of multiple user views. In this section we specify an architecture for database systems, called the three-schema architecture, that was proposed to help achieve and visualize these characteristics.
  • 50. 50 Three schema Architecture •The three schema architecture is also called ANSI/SPARC architecture or three-level architecture. •This framework is used to describe the structure of a specific database system. •The three schema architecture is also used to separate the user applications and physical database. •The three schema architecture contains three-levels. It breaks the database down into three different categories.
  • 52. 52
  • 53. In the above diagram: •It shows the DBMS architecture. •Mapping is used to transform the request and response between various database levels of architecture. •Mapping is not good for small DBMS because it takes more time. •In External / Conceptual mapping, it is necessary to transform the request from external level to conceptual schema. •In Conceptual / Internal mapping, DBMS transform the request from the conceptual to internal level.
  • 54. 1. Internal Level (Internal schema) •The internal level has an internal schema which describes the physical storage structure of the database. •The internal schema is also known as a physical schema. •It uses the physical data model. It is used to define that how the data will be stored in a block. •The physical level is used to describe complex low-level data structures in detail. 2. Conceptual Level (Conceptual schema) •The conceptual schema describes the design of a database at the conceptual level. Conceptual level is also known as logical level. •The conceptual schema describes the structure of the whole database. •The conceptual level describes what data are to be stored in the database and also describes what relationship exists among those data. •In the conceptual level, internal details such as an implementation of the data structure are hidden. •Programmers and database administrators work at this level.
  • 55. 3. External Level (External schema) •At the external level, a database contains several schemas that sometimes called as subschema. The subschema is used to describe the different view of the database. •An external schema is also known as view schema. •Interested part of the database is viewed by the user •The view schema describes the end user interaction with database systems.
  • 56. 56
  • 57. Data Independence •Data independence can be explained using the three-schema architecture. •Data independence tells about modify the schema at one level of the database system without altering the schema at the next higher level. There are two types of data independence:
  • 58. 58 1. Logical Data Independence •Logical data independence refers characteristic of being able to change the conceptual schema without having to change the external schema. •Logical data independence is used to separate the external view from the conceptual view. •If we do any changes in the conceptual view of the data, then the user view of the data would not be affected.
  • 59. 59 2. Physical Data Independence
  • 60. 2. Physical Data Independence •Physical data independence can be defined as the capacity to change the internal schema without having to change the conceptual schema. •If we do any changes in the storage size of the database system server, then the Conceptual structure of the database will not be affected. •Physical data independence is used to separate conceptual levels from the internal levels. •Physical data independence occurs at the logical interface level.
  • 62. 62 • Database Language • A DBMS has appropriate languages and interfaces to express database queries and updates. • Database languages can be used to read, store and update the data in the database.
  • 63. 1. Data Definition Language •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. •Used by the DBA and database designers to specify the conceptual schema of a database. Here are some tasks that come under DDL: •Create: It is used to create objects in the database. •Alter: It is used to alter the structure of the database. •Drop: It is used to delete objects from the database. •Truncate: It is used to remove all records from a table. •Rename: It is used to rename an object.
  • 64. • The DDL is used to specify the conceptual schema only. Another language, the storage definition language (SDL), is used to specify the internal schema. • View definition language (VDL), to specify user view 64
  • 65. 2. Data Manipulation Language • DML stands for Data Manipulation Language. 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. • Merge: It performs UPSERT operation, i.e., insert or update operations. • Lock Table: It controls concurrency.
  • 66. • High Level or Non-procedural Languages: e.g., SQL, are set- oriented and specify what data to retrieve than how to retrieve. Also called declarative languages. • Low Level or Procedural Languages: record-at-a-time; they specify how to retrieve data and include constructs such as looping. 66
  • 67. 3. Data Control Language •DCL stands for Data Control Language. It is used to retrieve the stored or saved data. •Example commands •R Grant: It is used to give access privileges to the user to accesses the database. •Revoke: It is used to take back permissions from the user.
  • 68. 4. Transaction Control Language TCL is used to run the changes made by the DML statement. TCL can be grouped into a logical transaction. Here are some tasks that come under TCL: •Commit: It is used to save the transaction on the database. •Rollback: It is used to restore the database to original since the last Commit.
  • 69. INTERFACES 1. Menu-Based Interfaces for Browsing ,These interfaces present the user with lists of options, called menus, No need to memorize the specific commands and syntax of a query language; rather, the query is composed step by step by picking options from a menu that is displayed by the system. Pull-down menus are becoming a very popular technique in window-based user interfaces. 69
  • 70. 2. Forms-Based Interfaces – A forms-based interface displays a form to each user. Users can fill out all of the form entries to insert a new data, or they can fill out only certain entries Example: SQL * Forms is a form-based language that specifies queries using a form. 3. Graphical User Interface – A GUI typically displays a schema to the user in diagrammatic form. The user then can specify a query by manipulating the diagram. In many cases, GUI’s utilize both menus and forms. Most GUIs use a pointing device such as mouse, to pick certain part of the displayed schema diagram.
  • 71. 4. Natural language Interfaces – These interfaces accept request written in English or some other language and attempt to understand them. 5. Speech Input and Output – Takes .the input in the form of speech ,analyze the speech with already predefined words and produces the output
  • 72. 6. Interfaces for DBA – . These include commands for creating accounts,, granting account authorization, changing a schema, reorganizing the storage structures of a databases.
  • 73. Database System Environment A DBMS is a complex software system. In this section we discuss the types of soft-ware components that constitute a DBMS 1. DBMS Component Modules Figure illustrates, in a simplified form, the typical DBMS components. The figure is divided into two parts. 1. The top part of the figure refers to the various users of the database environment and their interfaces. 2. The lower part shows the internals of the DBMS responsible for storage of data and processing of transactions.
  • 75. Let us consider the top part of Figure, It shows interfaces for the DBA staff, Casual users: who work with interactive interfaces to formulate queries, Application programmers: who create programs using some host programming languages, and parametric users who do data entry work by supplying parameters to canned transactions. The DBA staff works on defining the database and tuning it by making changes to its definition using the DDL and other privileged commands. 1 DBMS COMPONENT MODULE
  • 76. 1 DBMS COMPONENT MODULE • In the lower part of Figure, • DDL compiler :Process schema definitions and compile the DDL statement and stores in the catalog • Query Compiler :handles the high level queries • Query Optimizer : Accesses the query in the faster level • Precompiled : Extracts the DML commands from application program • DML Compiler :Converts DML commands into object code for access to the database 76
  • 77. 1 DBMS COMPONENT MODULE • Run time database processor : Handles the database accesses at run time it executes the following (1) the privileged commands, (2) Normal executable queries (3) the canned transactions with runtime parameters. • It works with system catalog and stored data manager ,It also responsible for concurrency control and backup and recovery systems • Stored Data manager : Data Transfer between disk and main memory 77
  • 78. 2. Database System Utilities In addition to possessing the software modules just described, most DBMSs have database utilities that help the DBA manage the database system. Common utilities have the following types of functions: Loading. A loading utility is used to load existing data files—such as text files or sequential files—into the database. Usually, the current (source) format of the data file and the desired (target) database file structure are specified to the utility. Backup. A backup utility creates a backup copy of the database, usually by dumping the entire database onto tape or other mass storage medium. The backup copy can be used to restore the database in case of catastrophic disk failure.
  • 79. Database storage reorganization. This utility can be used to reorganize a set of database files into different file organizations, and that improves the performance. Performance monitoring. Such a utility monitors database usage and provides statistics to the DBA. The DBA uses the statistics in making decisions such as whether or not to reorganize files
  • 80. 3. Tools, Application Environments, and Communications Facilities CASE tools are used in the design phase of database systems. Another tool that can be quite useful in large organizations is an expanded data dictionary (or data repository) system. Application development environments, such as PowerBuilder (Sybase) or JBuilder (Borland), have been quite popular. These systems provide an environment for developing database applications and include facilities like GUI development, querying and updating, and application program development.
  • 81. The DBMS should have communications software, whose function is to allow users to accesses the remote database through computer terminals, workstations, or personal computers.
  • 82. Centralized and Client/Server Architectures for DBMSs 1. Centralized DBMSs Architecture Centralized DBMS: a) Merge everything into single system including- Hardware, DBMS software, application programs, and user interface processing software. b) User can still connect by a remote terminal – but all processing is done at centralized site.
  • 84. Architectures for DBMS have pursued trends similar to those generating computer system architectures. Earlier architectures utilized mainframes computers to provide the main processing for all system functions including user application programs as well as user interface programs as well all DBMS functionality. The reason was that the majority of users accessed such systems via computer terminals that did not have processing power and only provided display capabilities. Thus all processing was performed remotely on the computer system and only display information and controls were sent from the computer to the display terminals which were connected to central computer via a variety of types of communication networks. As prices of hardware refused most users replaced their terminals with PCs and workstations. At first database systems utilized these computers similarly to how they have used is play terminals so that DBMS itself was still a Centralized DBMS in which all the DBMS functionality application program execution and user interface processing were carried out on one Machine.
  • 85. Basic 2-tier Client-Server Architectures: Specialized Servers with Specialized functions • Print server • File server • DBMS server • Web server • Email server Clients are able to access the specialized servers as needed Logical two-tier client server architecture:
  • 86. Clients: • Offer appropriate interfaces through a client software module to access as well as utilize the various server resources. • Connected to the servers by means of some form of a network. • (LAN- local area network, wireless network and so on.) DBMS Server: • Provides database query as well as transaction services to the clients • Relational DBMS servers are habitually called query servers, SQL servers, or transaction servers • Applications running on clients use an Application Program Interface (API) to access server databases via standard interface such as: ODBC- Open Database Connectivity standard JDBC- for Java programming access
  • 87. Two Tier Client-Server Architecture: a) A client program may perhaps connect to several DBMSs sometimes called the data sources. b) In general data sources are able to be files or other non-DBMS software that manages data. Other variations of clients are likely- example in some object DBMSs more functionality is transferred to clients including data dictionary functions, optimization as well as recovery across multiple servers etc.
  • 88. Three Tier Client-Server Architecture: a) Common for Web applications. b) Intermediate Layer entitled Application Server or Web Server. c) Stores the web connectivity software as well as the business logic part of the application used to access the corresponding data from the database server. d) Acts like a conduit for sending moderately processed data between the database server and the client. e) Three-tier Architecture is able to Enhance Security: • Database server merely accessible via middle tier. • Clients can’t directly access database server.
  • 89. Classification of Database Management Systems Database management systems can be classified based on several criteria, such as the data model, user numbers and database distribution, all described below. Classification Based on Data Model The most popular data model in use today is the relational data model. Well- known DBMSs like Oracle, MS SQL Server, DB2 and MySQL support this model. Other traditional models, such as hierarchical data models and network data models, are still used in industry mainly on mainframe platforms. However, they are not commonly used due to their complexity. These are all referred to as traditional models because they preceded the relational model. Classification Based on User Numbers A DBMS can be classification based on the number of users it supports. It can be a single-user database system, which supports one user at a time, or a multiuser database system, which supports multiple users concurrently.
  • 90. Classification Based on DatabaseDistribution There are four main distribution systems for database systems and these, in turn, can be used to classify the DBMS. 4. Heterogeneous distributed database systems 1. Centralized systems 2. Distributed database system 3. Homogeneous distributed database systems
  • 91. 1. Centralized systems With a centralized database system, the DBMS and database are stored at a single site that is used by several other systems too. This is illustrated in Figure Figure . Example of a centralized database system In the early 1980s, many Canadian libraries used the GEAC 8000 to convert their manual card catalogues to machine-readable centralized catalogue systems. Each book catalogue had a barcode field similar to those on supermarket products.
  • 92. 2. Distributed database system In a distributed database system, the actual database and the DBMS software are distributed from various sites that are connected by a computer network, as shown in Figure
  • 93. 3. Homogeneous distributed database systems Homogeneous distributed database systems use the same DBMS software from multiple sites. Data exchange between these various sites can be handled easily. For example, library information systems by the same vendor, such as Geac Computer Corporation, use the same DBMS software which allows easy data exchange between the various Geac library sites. 4. Heterogeneous distributed database systems In a heterogeneous distributed database system, different sites might use different DBMS software, but there is additional common software to support data exchange between these sites. For example, the various library database systems use the same machine-readable cataloguing (MARC) format to support library record data exchange.
  • 94. 94
  • 97. 97
  • 102. 102
  • 103. 103
  • 107. End of Module 01 107