SlideShare a Scribd company logo
1 of 86
Download to read offline
DATABASE
MANAGEMENT SYSTEMS
DATABASE AND DATABASE USERS
Basic Definitions :
Data :
 Data is a Representation of facts, figures, statistics etc. having no
particular meaning.
 Data can be in the form of numbers, characters, symbols, or even
pictures.
 Ex:
 1,ABC,19 etc.
Information :
 It is a processed data (or) Collection of data which is having perfect
meaning is called information.
Field:
 A field is a single piece of information, a record is one complete set of
fields and a file is a collection of records.
EX: Telephone book is analogous to file. It contains a list of records ,
each of which consist of three fields : Name, Address, And telephone
numbers.
Database :
 A database is an collection of related data(information) that
is organized So that it can easily be accessed,managed,and
Updated.
Examples:
University Database
Data: Departments,Students,Exams,Rooms etc..
Usage: Create Exam plans,Enter Exam Results, create Statistics
and Build Timetable
Bank Database
Data: Clients,Accounts,Credits,Funds etc..
Applications: Accounting,Transfers.Risk management
Airline Database
Data: Flights,Passengers,Employees,Airplanes Etc…
Applications: Reservation,Booking,CreatingFlight Schedule.
Database System :
 A database system is a way of organizing information on a
computer , implemented by a set of computer programs.
Data Base Management System (DBMS) :
 It is a collection of programs that enables user to create and
maintain a database.
 In other words it is general-purpose software that provides
the users with the processes of defining, constructing and
manipulating the database for various applications.
Ex:
Computerized library Systems
Automated teller machines
Flight reservation Systems
FUNCTIONALITIES OF DATA BASE
Defining A Database :
 Defining a database involves specifying the Data types,
structures, and constraints of the data to be stored in the
database.
Constructing A Database:
 constructing the database is the process of storing data on
some storage medium that is controlled by the DBMS.
Manipulating A Database:
 Manipulating A Database includes functions such as
Querying the database to retrieve specific data, updating
the database and generating from the data.
Sharing:
 Allows multiple users to access the database
simultaneously.
PROPERTIES OF THE DATABASE :
There are three properties:
1. A database represents some aspects of the real world.
2. A database is a logically coherent collection of data with
some inherent meaning.
3. A database is designed, built, and populated with data for
a Specific purposes.
 Example of a simple database:
Student Course
Grade Report
Name Rollno Class Department
Somu 1 A CS
Raju 2 B CS
Radha 3 C ECE
Subject name Subject code Department
CA DCCA101 CS
DBMS DCCA102 CS
Accounts DCCA103 COMMERCE
Rollno Course no Grade
1 Cs01 A
2 Cs02 B
3 Com3 B
MAIN CHARACTERISTICS OF THE DATABASE APPROACH
Self-describing nature of a database system:
 A DBMS catalog stores the description of a particular
database (e.g. data structures, types, and constraints)
 The description is called meta-data.
 This allows the DBMS software to work with different
database applications.
Insulation between programs and data:
 Called program-data independence.
 Allows changing data structures and storage organization
without having to change the DBMS access programs.
Support of multiple views of the data:
 Each user may see a different view of the database, which
describes only the data of interest to that user.
 Ex:
 For example, one user of the student database may be
interested only in accessing and printing the transcript of each
student and another user may be interested only in checking
which course the students enrolled.
Sharing of data and multi-user transaction processing:
 Allow multiple users to access the database at the
same time.
 Concurrency control software–
 Ensure that several users trying to update the
same data do so in a controlled manner.
 Result of the updates is correct.
• OLTP (Online Transaction Processing) is a major part of
database applications. This allows hundreds of concurrent
transactions to execute per second.
• Ex:
• For example, when several reservation clerks try to assign a
seat on a particular train, the DBMS should ensure that each
seat can be accessed by only one clerk at a time for assignment
to a passenger.
Data Abstraction:
 Data abstraction is the method of hiding the unimportant
details that are present in the database from the end users to
make the accessing of data easy and secure.
DIFFERENT PEOPLE BEHIND DBMS
 These apply to "large" databases, not "personal" databases that are defined,
constructed, and used by a single person via, say, Microsoft Access.
 There are two categories of people behind DBMS
i. Actors on the Scene
ii. Workers behind the scene
 Actors on the Scene: They actually use and control the database content;
and design, develop and maintain database applications
 Database Administrators
 Database Designers
 End-users
 System Analysts, Application Programmers,( Software Engineers)
Database Administrator (DBA):
 DBA is a person who is responsible for authorizing access to the database,
coordinating and monitoring its use, and acquiring software and hardware
resources as needed.
 The DBA will then create a new account id and password for the user if
he/she need to access the data base.
 DBA is also responsible for providing security to the data base and he
allows only the authorized users to access/modify the data base.
 DBA also monitors the recovery and back up and provide technical support.
 DBA repairs damage caused due to hardware and/or software failures.
Database Designers:
 Database Designers are responsible for identifying the data to be stored in
the database and for choosing appropriate structures to represent and store
the data.
 They must communicate with the end-users and understand their needs.
End Users:
 These are persons who access the database for querying, updating, and
generating reports.
They are categorized as:
 Casual end-users: occasionally access the database, but they may need
different information each time.
 Naive or parametric end-users: constantly update and query databases,
using standard types of queries and updates. They don’t have any DBMS
knowledge but they frequently use the data base applications in their daily
life to get the desired results.
 Example: Bank clerks, Reservation clerks etc.
 Sophisticated end-users :Sophisticated users can be engineers, scientists,
business analyst, who are familiar with the database. They can develop
their own data base applications according to their requirement. 1 `1
 They don’t write the program code but they interact the data base by
writing SQL queries directly through the query processor.
 Stand-alone end-users: maintain personal databases by using easy-
to-use ready-made program packages.
System Analysts, Application Programmers, Software Engineers:
 System Analysts: Determine needs of end users, especially naive and
parametric users, and develop specifications for canned transactions
that meet these needs.
 They check whether all the requirements of end users are satisfied.
 Application Programmers: Application Program are the back end
programmers who writes the code for the application programs.
 They are the computer professionals.
 These programs could be written in Programming languages such as
Visual Basic, Developer, C, FORTRAN, COBOL etc.
Workers Behind the Scene:
 Those who design and develop the DBMS software and related tools.
1)DBMS system designers/ implementers : are persons who
design and implement the DBMS Module, and interfaces as a
Software package.
2) Tool developers: include person who design and implement
tools –the software packages that facilitate Database system
design and use that help improve performance.
3) 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. Responsible for the day-to-
day operation of the system.
Advantages of using DBMS Approach :
1.Controlling Redundancy
 The Database Management System will not allow storing the
redundant data (same data multiple times) in the database.
 The redundancy in storing the same data multiple times leads to
several problems.
 storage space is wasted when the same data is stored repeatedly.
 Files that represent the same data may become inconsistent and etc.
2.Restricting Unauthorized Access:
 The Database Management System restricts unauthorized access of
the database by enforcing restrictions such as providing a password
for an authorized person to access the data.
3.Providing Persistent Storage for Program Objects
 Databases can be used to provide persistent storage for program
objects and data structures.
4. Providing Storage Structures for Efficient Query Processing
 Database systems must provide capabilities for efficiently
executing queries and updates.
5. Providing Backup and Recovery
 A DBMS must provide facilities for recovering from hardware or
software failures.
6. Providing Multiple user interface
 Many types of users use the database , A DBMS should provide
variety Of User interfaces.
7.It Allows the Data Sharing
 A Database allows the sharing of data under its control by any
number of application programs or users.
8. It ensures data integrity
 Data integrity means that the data contained in the database is
both accurate and consistent.
9.
Representing complex relationships among data.
10. The Data base management system (DBMS) helps to
produce quick answers to database queries thus
making data accessing faster and more accurate.
Disadvantages of DBMS :
 Cost of Hardware & Software
 Cost of Data Conversion
 Cost of Staff Trailing
 Appointing Technical Staff
 Database Damage
A Brief History of Database Applications:
Early Database Applications Using Hierarchical and Network
Systems:
 Large numbers of records of similar structure.
 One of the main problems with early database systems was not flexible
to develop new queries and reorganizing the data was so difficult.
 Another shortcoming of early systems was that they provided only
programming language interfaces.
Providing Data Abstraction and Application Flexibility with Relational
Databases:
 Relational databases were originally proposed to separate the
physical storage of data from its conceptual representation and to
provide a mathematical foundation for data representation and
querying.
 The relational data model also introduced a "high-level query
language" (SQL) that provided an alternative to programming
language interfaces, making it much faster to write new queries.
 Relational databases now exist on almost all types of computers,
from small personal computers to large servers.
Object-Oriented Applications and the Need for More Complex
Databases:
 object-oriented databases (OODBs) were considered a
competitor to relational databases, since they provided more
general data structures.
 Used in specialized applications: engineering design,
multimedia publishing, and manufacturing systems.
Interchanging Data on the Web for E-Commerce Using XML:
 In the 1990s, electronic commerce (e-commerce) emerged as
a major application on the Web.
 A variety of techniques were developed to allow the
interchange of data on the Web.
 Currently, extended Markup Language (XML) is considered
to be the primary standard for interchanging data among
various types of databases and Web pages.
Extending database capabilities for new applications
1. Extensions to better support specialized requirements for
applications
2. Enterprise resource planning (ERP)
3. Customer relationship management (CRM)
Databases versus information retrieval
 Information retrieval (IR)
 Deals with books, manuscripts, and various forms of library-based
articles.
When not to use a DBMS :
a) Main costs of using a DBMS:
i) High initial investment and possible need for additional
hardware.
ii) Overhead for providing generality, security, concurrency control,
recovery, and integrity functions.
b) When a DBMS may be unnecessary:
i) If the database and applications are simple, well defined and not
expected to change.
ii) If there are stringent real-time requirements that may not be met
because of DBMS overhead.
iii)If access to data by multiple users is not required.
c) When no DBMS may be sufficient:
i) If the database system is not able to handle the complexity of data
because of modeling limitations .
ii) If the database users need special operations not supported by
the DBMS.
Database Administrators (DBA):
 The DBA is responsible for authorizing access to the
database, for Coordinating and monitoring its use and for
acquiring software and hardware resources as needed.
 These are the people, who maintain and design the
database daily.
DBA is responsible for the following Issues:
o Design of the conceptual and physical schemas:
• The DBA is responsible for interacting with the users
of the system to understand what data is to be stored in
the DBMS and how it is likely to be used.
• The DBA creates the original schema by writing a set
of definitions and is Permanently stored in the 'Data
Dictionary.
 Security and Authorization:
 The DBA is responsible for ensuring the unauthorized data access
is not permitted.
 The granting of different types of authorization allows the DBA to
regulate which parts of the database various users can access.
 Storage structure and Access method definition:
 The DBA creates appropriate storage structures and access
methods by writing a set of definitions, which are translated by the
DDL compiler.
 Data Availability and Recovery from Failures:
 The DBA must take steps to ensure that if the system fails, users
can continue to access as much of the uncorrupted data as possible.
The DBA also work to restore the data to consistent state.
 Database Tuning:
 The DBA is responsible for modifying the database to ensure
adequate Performance as requirements change.
 Integrity Constraint Specification:
 The integrity constraints are kept in a special system structure
that is consulted by the DBA whenever an update takes place in
the system.
Database System Concepts
AND architecture
2.1 Data Model:
 A data model is a collection of concepts that can be used to
describe the structure of a database.
 By structure of a database we mean the data types, relationships
and constraints that apply to the data.
 It defines the data elements and the relationships between the
data elements.
 Data Models are used to show how data is stored, connected,
accessed and updated in the database management system.
 Though there are many data models being used nowadays but
the Relational model is the most widely used model.
 Data model can be Categorized in multiple ways.
High-level or conceptual data models :
 high level or conceptual model is the User level data model .
 This provides concepts that are close to the way that many users perceive
data.
 Conceptual data models use concepts such as entities, attributes, and
relationships.
 Entity: Represents a real world object such as Student, Employee.
 Attribute: Represents property of interest that describes an entity, such as
name or Salary
 Relationships: Relationships among two or more entities.
Low level-Physical data models:
 provides concepts that describe the details of how data is stored in the
computer model.
 Low level data model is only for Computer specialists not for end-user.
Representation data model:
 provide concepts that describe the details of how data is stored on the
computer storage media, typically magnetic disks.
 Physical data models describe how data is stored as files in the computer by
representing information such as record formats, record orderings, and
access paths.
Types of Data Models :
1. Hierarchical Model
2. Network Model
3. Relational Model
4. Object-oriented Data Models
5. Object-Relational Models
Hierarchical Model:
1. Hierarchical Model was the first DBMS model.This model
organizes the data in the hierarchical tree structure.
2. 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.
 The data here is organized in a tree-like structure where the one-
to many relationship is between the data types.
 Also, there can be only one path from parent to any node.
 Each child node has a parent node but a parent node can have
more than one child node.
 Multiple parents are not allowed.
 If a parent node is deleted then the child node is automatically
deleted.
 Pointers are used to link the parent node with the child node and
are used to navigate between the stored data.
Advantages:
 Any change in the parent node is automatically reflected in the
child node so, the integrity of data is maintained
Disadvantages:
 Complex relationships are not supported.
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.
 In this model, as there are more relationships so data is more
related.
 This model has the ability to manage one-to-one relationships as
well as many-to many relationships.
 As there are more relationships so there can be more than one
path to the same record.
 This makes data access fast and simple.
 The operations on the network model are done with the help of
the circular linked list.
 The current position is maintained with the help of a program and
this position navigates through the records according to the
relationship.
Advantages of Network Model :
 The data can be accessed faster as compared to the hierarchical
model.
 Network model and there can be more than one path to reach a
particular node.
Disadvantages of Network Model :
 As more and more relationships need to be handled the system
might get complex.
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.
 Each row in the table is called tuple.
 A row contains all the information about any instance of the
object.
 Attribute or field:Attributes are the property which defines the
table or relation.
 In the above example, we have different attributes of the
employee like Salary, Mobile_no, etc.
Advantages of Relational Model :
 Simple: This model is more simple as compared to the network
and hierarchical model.
Disadvantages of Relational Model :
 Hardware Overheads: For hiding the complexities and
making things easier for the user this model requires more
powerful hardware computers and data storage devices.
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.
 In this model, two are more objects are connected through
links.
 We use this link to relate one object to other objects.
 This can be understood by the example given below.
Object-oriented Data Model consist of the following
object oriented Concepts:
1.Object: The real world entities and situations are represented as
objects in the object oriented database model.
2.Attributes and Methods: Every object has certain characteristics
.They are represented using attributes.
3.Class: Similar attributes and methods are grouped together using
a class.An object can be called Instance of the class.
4. Inheritance:A new class can be derived from the original class.
 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.
 The Behaviour of the objects is represented using methods.
 Similar attributes and methods are grouped together using a
Class.
Object-Relational Models :
 An Object relational model is a combination of a Object
oriented database model and a Relational database model.
 So, it supports objects, classes, inheritance etc. just like Object
Oriented models and has support for data types, tabular
structures etc. like Relational data model.
 One of the major goals of Object relational data model is to
close the gap between relational databases and the object
oriented practices frequently used in many programming
languages such as C++, C#, Java etc.
The advantages of the Object Relational model are −
Inheritance
 The Object Relational data model allows its users to inherit
objects, tables etc.
Complex DataTypes
 Complex data types can be formed using existing data types
Extensibility
 The functionality of the system can be extended in Object
relational data model.
Disadvantages of Object Relational model
 The object relational data model can get quite complicated and
difficult to handle at times as it is a combination of the Object
oriented data model and Relational data model and utilizes the
functionalities of both of them.
2.2 Schema and Instances:
Database Schema: A database schema represents the logical view of
the entire database.
 It defines how the data is organized and how the relations among
them are associated.
 Schemas provide a logical classification of objects in the database.
 A schema can contain tables, views, triggers, functions, packages,
and other objects.
 A database schema defines its entities and the relationship among
them.
 It contains a descriptive detail of the database, which can be depicted
by means of schema diagrams.
 It’s the database designers who design the schema to help
programmers understand the database and make it useful.
Schema Diagram
 From the above schema diagram student and Grade report are
related and course and prerequisite and section are related.
DBMS Instance :
 The data stored in database at a particular moment of time is
called instance of database.
 Database State: Refers to the content of a database at a moment in
time.
 Initial Database State: Refers to the database state when it is
initially loaded into the system.
 Valid State:A state that satisfies the structure and constraints of
the database.
2.3 SIMPLIFIED DATABASE SYSTEM :
 A database system is Computer-Based system to record and
maintain the information.A Database Management System
consists of a collection of inter-related data and a set of
program to access those data.
 The database and the DBMS software together is a Database
system.
 It consists of the following
1. User/Programmers
2. Applications programs/Queries
3. Software to process Queries/programs
4. Software to Access stored data
5. DBMS Catalog Contains the Stored database definition
(Metadata)
6. The Physical Stored database
A Simplified Database System Environment
 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
 The collection of data, usually referred to as the database, contains
information about one particular enterprise.
 The primary goal of DBMS is to provide an environment that is both
convenient and efficient to use in retrieving and storing database
information
 This system involves the control of how databases are Created,
interrogated and maintained to provide information needed by end
users and the organization.
 DBMS acts as the interface between the application programs and
database.
 There are many different types of DBMS, ranging from small systems
that run on personal computers to huge systems that run on
mainframes.
 Ex: Computerized library system
2.4 DBMS Architecture :
 Every database system logically organizes data with respect to
some model is called Data model.A Data model describes how
various pieces of data in the database are logically related to
each other
 The data model represents the relationship between entities.
The database model is also well known as Database
Architecture.
 The structure of a DBMS may be analyzed in two separate
architectures
 Logical DBMS Architecture
 Physical DBMS Architecture.
2.4.1 Logical DBMS Architecture (Three Schema/Level DBMS
Architecture):
 The three schema architecture is also calledANSI/SPARC
architecture or three-level architecture.
 The logicalArchitecture describes how data in the database is
perceived by users.
 It is now concerned with how the data is handled and processed by
the DBMS, but only with how it looks.
 The goal of theThree-schema architecture is to separate the user
application from the physical database.
 In this architecture, schemas can be defined at the following three
levels
 There are following three levels or layers of DBMSArchitecture
 External Level
 Conceptual Level
 Internal Level
2.4.1.1 Three Schema Architecture:
Physical level (or InternalView / Schema): The lowest level of
abstraction describes how the data are actually stored.
 The physical level describes physical storage structure of the database.
 Essentially, the physical schema summarizes how the relations
described in the conceptual schema are actually stored on secondary
storage devices such as disks and tapes.
Logical level (or ConceptualView / Schema): The next-higher
level of abstraction describes what data are stored in the database, and
what relationships exist among those data.
 The logical level thus describes the entire database in terms of a small
number of relatively simple structures.
 It hides physical storage details, concentrating upon describing
entities, data types, relationships, user operations, and constraints.
 Database administrators, who must decide what information to keep
in the database, use the logical level of abstraction.
View level (or ExternalView / Schema): The highest level of
abstraction Describes the various user views..
 It describes the part of the database that a particular user group is
interested in and hides the rest of the database from that user group.
 Usually a high-level model is used here.
2.4.1.2 Mapping:
 The processes of transforming requests and results between levels are
called mappings.
 In a DBMS based on the three-schema architecture, each user group
refers to its own external schema.
 Hence, the DBMS must transform a request specified on an external
schema into a request against the conceptual schema, and then into a
request on the internal schema for processing over the stored
database.
 If the request is a database retrieval, the data extracted from the
stored database must be reformatted to match the user’s
 There are basically two types of mapping in the
database architecture:
◦ External/conceptual mapping
◦ Conceptual/ internal mapping
Conceptual/ Internal Mapping
 The Conceptual/ Internal Mapping lies between the conceptual
level and the internal level. Its role is to define the
correspondence between the records and fields of the
conceptual level and files and data structures of the internal
level.
External/ Conceptual Mapping
 The external/Conceptual Mapping lies between the external
level and the Conceptual level. Its role is to define the
correspondence between a particular external and the
conceptual view.
2.4.2 Physical DBMS Architecture
The physicalArchitecture describes the software components used to enter and
process data, and how these software components are related and
interconnected.
The physical DBMSArchitecture divided into 2 parts:
 Back end
 Front end
Back end:
 The back end is responsible for managing the physical database and providing
necessary support and mappings for the internal, conceptual levels.
 Other benefits of DBMS, such as Security, integrity and access control are also
responsibility of the back end
Front end:
 The Front end is really an application that runs on the top of the DBMS.These
may be applications provided by the DBMS vendor, the use of the third party.
 The user interact with the front end and may not even be aware that the back
end exists.
2.5 DATA – INDEPENDENCE
 Data Independence is defined as a property of DBMS that helps
you to change Database Schema at one level of a database system
without requiring to change the Schema at the next higher level.
 Data Independence is one of the main advantages of DBMS
 The ability to modify a schema definition in one level without
affecting Schema definition in the next higher level is called
“Data Independence”
 There are two kinds of Data Independence
 1. Physical Data Independence
 2. Logical Data Independence
 Logical Data Independence: The capacity to change the
conceptual schema without having to change the external
schemas and their application programs.
Logical data independence is required as it-
 Makes sure that if the table is modified, the data should not be
affected.
 Absorbs the changes made because of the mapping between
the external and conceptual levels.
Examples of Logical Data independence Changes
 Dividing an existing record into two or more.
 To merge records into a single one.
 Adding/ Updating/ Deleting a new entity, relationship, or
attribute.
 Physical Data Independence: The capacity to change the
internal schema without having to change the conceptual
schema. Hence, the external schemas need not be changed as
well.
Physical data independence is required as it -
 Allows the user to design the database logically.
 Allows us to modify the physical devices without affecting the
conceptual mapping.
Examples of Physical Data independence Changes
 Switching to new storage like a hard drive or magnetic tapes.
 The location change of the database from one drive to another.
(like C drive to D drive).
 To modify the file organization technique.
2.6 Database Languages:
 Database Languages: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.
Types of Database Language:
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.
 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.
 The data definition language (DDL) is used by the DBA and by
database designers to define both schemas when no strict
separation of levels is maintained .
 The DBMS will have a DDL compiler whose function is to
process DDL statements in order to identify descriptions of the
schema constructs and to store the schema description in the
DBMS catalog.
Storage Definition Language (SDL):
 The storage definition language (SDL), is used to specify the internal
schema.The mappings between the two schemas may be specified in
either one.
 View Definition Language (VDL),View definition language is used to
specify user views and their mappings to the conceptual schema.
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.
 Comment: It is used to comment on the data dictionary.
These commands are used to update the database schema that's why they
come under Data definition language.
2. Data Manipulation Language :
 DML stands for Data Manipulation Language.
 It is used for accessing and manipulating data in a database.
 Data manipulation languages (DML) are used to perform
manipulation operation such as retrieval, insertion, deletion, and
modification of the data.
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.
 Call: It is used to call a structured query language or a Java
subprogram.
 Explain Plan: It has the parameter of explaining data.
 LockTable: It controls concurrency.
3. Data Control 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.)
Here are some tasks that come under DCL:
 Grant: It is used to give user access privileges to a database.
Grant to allow specified users to perform specified tasks.
 Revoke: It is used to take back permissions from the user.
There are the following operations which have the authorization
of Revoke: CONNECT, INSERT, USAGE, EXECUTE,
DELETE, UPDATE and SELECT
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 underTCL:
 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.
2.7 DBMS Interfaces
Interfaces are the programs which convert system language to
user understandable language and user language to system
understandable language. So its work likes a translator which
provides an environment in which a user can easily operate the
system
Types of interfaces provided by the DBMS include
 Menu-Based interface for web clients or browsing
 Forms-based interfaces
 GUI’s
 Natural Language interfaces
 Interfaces for parametric users
 Interfaces for the DBA
 Menu-Based interface for web clients or browsing:
These interfaces are used by the stand-alone users.These interfaces
present a set of options called menu to the users, from which user can
select an option
 Forms-based Interfaces: These are used by the parametric users.
In this type a form is displayed to the user. User has to fill all the
information required through form fields.
 Graphical user Interfaces (GUI’s): these are used by both user, by
parametric and by stand alone user. Both Form based and Menu based
is called GUI. Displays a schema to the user in diagram form.The user
can select his/her options using a mouse pointer.
 Natural language Interfaces: these Interfaces are used by the
Sophisticated users.This includes commands in English and it will have
its own Schema
 Interfaces for Parametric users: parametric users have small set of
operations they perform.Analyst and programmers design and
implement a special interface for each class of naive users.
 Interfaces for the DBA: Systems contain privileged commands only
for DBA staff. Including commands for creating accounts, authorizing
accounts, reorganizing the storage structure etc.
2.8 Database System Environment
The term database system refers to an organisation of
components that define and regulate the collection, storage,
management, and use of data within a database environment.
In high level view the database system is composed of the
following five major components:
 Hardware Components in a database System Environment
 Software Components in a database System Environment
 People in a Database System Environment
 Procedure in a Database Environment
 Data in the Database
1. Hardware Components in a database System
Environment
Hardware identifies all the system’s physical devices. It includes
computers, computer peripherals, network components etc
Database Environment
2. Software Components in the database system
Environment
To make the database system work properly, three types of
software are needed: Operating system, DBMS Software, and
Application programs.
 Operating System: It manages all hardware components and
allow other software to run on the computers. Ex:Windows,
Linux and etc
 DBMS Software: It manages the database within the database
system. Some example of DBMS software include Oracle,
Access, MySql etc
 Application programs: These are used to access and
manipulate data in the DBMS and to manage the computer
environment in which data access and manipulation take place.
 Application programs are most commonly used to access data
to generate reports.
 Most of the application programs provide GUI.
3. People in Database System Environment:
It includes all users associated with the database system. On the
basis of primary job function we can identify five types of users
in a database system.
System Administrator: They supervise the database system’s
general operations.
Database Administrators: They are also known also as DBA’s.
They manage the DBMS and ensure that the database is function
properly.
Database Designers: They design the database structure.They
are database architects.
Systems Analyst and programmers: They design and
implement the application programs.
End users: are the people who use the application. Ex: Sales-
clerks, supervisors, managers are classified as end users.
4. Procedure in a Database Environment
 Procedures are the instructions and business rules that govern
the design and use of the database system.
 Procedures are critical component of the system. Procedures
play an important role in a company because they enforce the
standards by which business is conducted in an organisation.
5. Data in the Database
 Data are the very important basic entity in a database.
 It is the collection of facts stored in the database.
 Data is the raw material from which information is generated
2.9 Centralized DBMS Architecture
 “ A Centralized DBMS in which all the DBMS
functionality, application program execution and user
interface processing were carried out on a single
machine.”
 Used mainframe Computers are used for processing all system
functions including user application programs, user interface
programs and DBMS functionalities.
 The reason was that most users accessed such systems via computer
terminals that did not have processing power and only provided
display capabilities.
 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 the
central computer via various types of communications networks.
2.10 Client/Server Architectures :
 The client/server architecture was developed to deal with computing
environments in which a large number of PCs, workstations, file
servers, printers, database servers,Web servers, e-mail servers, and
other software and equipment are connected via a network.
 Client – a user machine that provides user interface capabilities and
local processing
 Server – machine that provides services to client machines such as
file access, printing, and database access.
 The idea is to define specialized servers with specific functionalities.
 File server that maintains the files of the client machines.
 Another machine can be designated as a printer server by being
connected to various printers; all print requests by the clients are
forwarded to this machine.
 Web servers or e-mail servers also fall into the specialized server
category
2. 10. 1TwoTier Client-Server Architecture :
 User Interface Programs and Application Programs run on the
client side when DBMS Access is needed.
 The query and transaction functionality related to SQL
processing remained on the server side.
 Interface called ODBC (Open Database Connectivity) provides
an Application program interface (API) allow client side
programs to call the DBMS.
 The program establishes a Connection to the DBMS on the
Server side. Once the Connection is created, the client can
Communicate with the DBMS.
 In a new approach, primarily adopted by OODBMS, client
programs perform more work including data dictionary
functions, query optimization and others.
2.10.2 Three Tier Client-Server Architecture
 Client - Contain GUI interfaces and some additional application-
specific business rules.
 Application Server or theWeb Server -Accepts requests from
the client, processes the request and sends database queries and
commands to the database server, and then passes processed data from
the database server to the clients, where it may be processed further
and filtered to be presented to users in GUI format. - It can also
improve database security by checking client’s credentials before
forwarding a request from the database server.
 Presentation Layer: Displays information to the user and allows data
entry.
 The business Logic Layer: - Handles intermediate rules and
constraints before data is passed up to the user or down to the DBMS.
- Can also act as aWeb server, which retrieves query results from the
database server and formats them into dynamicWeb pages that are
viewed by theWeb browser at the client side
 The bottom Layer: Includes all the data management services
2.11 Distributed DBMS
 A Distributed Database is a single logical database that is spread
physically across computers in multiple locations that are
connected by a data communications network.
 A DDB is a collection of logically related data distributed across
several machines interconnected by a computer network.
 An application program operating on a DDB may access data
stored at more than one machine
 A set of co-operating databases, each resident at a different site
that the user views and manipulates as a centralized database
“A Distributed DBMS (DDBMS) is a software system that permits
the management of the distributed database and make the
distribution transparent to users”
Distributed DBMS (DDBMS)
Advantages of Distributed DBMS
 Naturally distributed data
 Reliability and availability
 Controlled data sharing
 Improved performance
Disadvantages of Distributed DBMS
 Complexity
 Cost, Security
 Lack of standard and Experience
 Database design is more Complex
2.12 Difference between Centralized & Distributed database
2.13 Classification of DBMS
The DBMS can be classified into different categories on the basis of
several criteria such as the data model they are using, number of users
they support, number of sites over which the database is distributed and
purpose they serve.
1.Data Model Classification
 Relational data model
 Hierarchical data model
 Network data model
 Object-Oriented data model
 Object-Relational data model
2.Number of Users
 Single User System – Single user system the database resides on one
computer and only accessed by one user at a time
 Multiuser system – multiuser can access the database simultaneously. In
multiuser DBMS, the data is both integrated and shared
3. Number of sites
 Centralized – data is stored in single site
 Distributes – Database & dbms software stored over many sites connected
by network
 Homogeneous – use same dbms software at multiple sites
 OnlineTransaction processing(OLTP) – Used for data entry and retrieval.
Ex: Banking, airlines etc
4.Cost
 Low-end system under $3000
 High-end system, over $100,000
5. Purpose
 General purpose
 Special Purpose
DBMS is a general purpose software system. It can be designed for specific
purposes such as airline or railway reservation.

More Related Content

Similar to DBMS_UNIT_1.pdf

database introductoin optimization1-app6891.pdf
database introductoin optimization1-app6891.pdfdatabase introductoin optimization1-app6891.pdf
database introductoin optimization1-app6891.pdfparveen204931475
 
Introduction to Database
Introduction to DatabaseIntroduction to Database
Introduction to DatabaseSiti Ismail
 
Database Management Systems (Mcom Ecommerce)
Database Management Systems (Mcom Ecommerce)Database Management Systems (Mcom Ecommerce)
Database Management Systems (Mcom Ecommerce)Rupen Parte
 
Chapter 1. Itroduction To DBMS -.pptx
Chapter 1. Itroduction To DBMS -.pptxChapter 1. Itroduction To DBMS -.pptx
Chapter 1. Itroduction To DBMS -.pptxsantosh96234
 
Chapter 1 - testing
Chapter 1 - testing Chapter 1 - testing
Chapter 1 - testing jlope438
 
Mca ii-dbms- u-i-introductory concepts of dbms
Mca ii-dbms- u-i-introductory concepts of dbmsMca ii-dbms- u-i-introductory concepts of dbms
Mca ii-dbms- u-i-introductory concepts of dbmsRai University
 
DBMS introduction and functionality of of dbms
DBMS introduction and functionality of  of dbmsDBMS introduction and functionality of  of dbms
DBMS introduction and functionality of of dbmsranjana dalwani
 

Similar to DBMS_UNIT_1.pdf (20)

1.introduction qb
1.introduction qb1.introduction qb
1.introduction qb
 
Introduction DBMS.pptx
Introduction DBMS.pptxIntroduction DBMS.pptx
Introduction DBMS.pptx
 
Database, Lecture-1.ppt
Database, Lecture-1.pptDatabase, Lecture-1.ppt
Database, Lecture-1.ppt
 
database introductoin optimization1-app6891.pdf
database introductoin optimization1-app6891.pdfdatabase introductoin optimization1-app6891.pdf
database introductoin optimization1-app6891.pdf
 
Introduction to Database
Introduction to DatabaseIntroduction to Database
Introduction to Database
 
DBMS and its Models
DBMS and its ModelsDBMS and its Models
DBMS and its Models
 
En ch01
En ch01En ch01
En ch01
 
Unit 1.pptx
Unit 1.pptxUnit 1.pptx
Unit 1.pptx
 
Database Management Systems (Mcom Ecommerce)
Database Management Systems (Mcom Ecommerce)Database Management Systems (Mcom Ecommerce)
Database Management Systems (Mcom Ecommerce)
 
Unit 2 DATABASE ESSENTIALS.pptx
Unit 2 DATABASE ESSENTIALS.pptxUnit 2 DATABASE ESSENTIALS.pptx
Unit 2 DATABASE ESSENTIALS.pptx
 
Chapter 1. Itroduction To DBMS -.pptx
Chapter 1. Itroduction To DBMS -.pptxChapter 1. Itroduction To DBMS -.pptx
Chapter 1. Itroduction To DBMS -.pptx
 
Dbms models
Dbms modelsDbms models
Dbms models
 
Unit1 dbms
Unit1 dbmsUnit1 dbms
Unit1 dbms
 
Chapter 1 - testing
Chapter 1 - testing Chapter 1 - testing
Chapter 1 - testing
 
Mca ii-dbms- u-i-introductory concepts of dbms
Mca ii-dbms- u-i-introductory concepts of dbmsMca ii-dbms- u-i-introductory concepts of dbms
Mca ii-dbms- u-i-introductory concepts of dbms
 
DataMgt - UNIT-I .PPT
DataMgt - UNIT-I .PPTDataMgt - UNIT-I .PPT
DataMgt - UNIT-I .PPT
 
Dbms Useful PPT
Dbms Useful PPTDbms Useful PPT
Dbms Useful PPT
 
DBMS introduction and functionality of of dbms
DBMS introduction and functionality of  of dbmsDBMS introduction and functionality of  of dbms
DBMS introduction and functionality of of dbms
 
Dbms
DbmsDbms
Dbms
 
DBMS Part1.pptx
DBMS Part1.pptxDBMS Part1.pptx
DBMS Part1.pptx
 

More from Koteswari Kasireddy

Chapter-7-Sampling & sampling Distributions.pdf
Chapter-7-Sampling & sampling Distributions.pdfChapter-7-Sampling & sampling Distributions.pdf
Chapter-7-Sampling & sampling Distributions.pdfKoteswari Kasireddy
 
Object_Oriented_Programming_Unit3.pdf
Object_Oriented_Programming_Unit3.pdfObject_Oriented_Programming_Unit3.pdf
Object_Oriented_Programming_Unit3.pdfKoteswari Kasireddy
 
Relational Model and Relational Algebra.pptx
Relational Model and Relational Algebra.pptxRelational Model and Relational Algebra.pptx
Relational Model and Relational Algebra.pptxKoteswari Kasireddy
 
Unit 4 chapter - 8 Transaction processing Concepts (1).pptx
Unit 4 chapter - 8 Transaction processing Concepts (1).pptxUnit 4 chapter - 8 Transaction processing Concepts (1).pptx
Unit 4 chapter - 8 Transaction processing Concepts (1).pptxKoteswari Kasireddy
 
Database System Concepts AND architecture [Autosaved].pptx
Database System Concepts AND architecture [Autosaved].pptxDatabase System Concepts AND architecture [Autosaved].pptx
Database System Concepts AND architecture [Autosaved].pptxKoteswari Kasireddy
 
Control_Statements_in_Python.pptx
Control_Statements_in_Python.pptxControl_Statements_in_Python.pptx
Control_Statements_in_Python.pptxKoteswari Kasireddy
 
parts_of_python_programming_language.pptx
parts_of_python_programming_language.pptxparts_of_python_programming_language.pptx
parts_of_python_programming_language.pptxKoteswari Kasireddy
 

More from Koteswari Kasireddy (20)

DA Syllabus outline (2).pptx
DA Syllabus outline (2).pptxDA Syllabus outline (2).pptx
DA Syllabus outline (2).pptx
 
Chapter-7-Sampling & sampling Distributions.pdf
Chapter-7-Sampling & sampling Distributions.pdfChapter-7-Sampling & sampling Distributions.pdf
Chapter-7-Sampling & sampling Distributions.pdf
 
Object_Oriented_Programming_Unit3.pdf
Object_Oriented_Programming_Unit3.pdfObject_Oriented_Programming_Unit3.pdf
Object_Oriented_Programming_Unit3.pdf
 
unit-3_Chapter1_RDRA.pdf
unit-3_Chapter1_RDRA.pdfunit-3_Chapter1_RDRA.pdf
unit-3_Chapter1_RDRA.pdf
 
business analytics
business analyticsbusiness analytics
business analytics
 
Relational Model and Relational Algebra.pptx
Relational Model and Relational Algebra.pptxRelational Model and Relational Algebra.pptx
Relational Model and Relational Algebra.pptx
 
CHAPTER -12 it.pptx
CHAPTER -12 it.pptxCHAPTER -12 it.pptx
CHAPTER -12 it.pptx
 
WEB_DATABASE_chapter_4.pptx
WEB_DATABASE_chapter_4.pptxWEB_DATABASE_chapter_4.pptx
WEB_DATABASE_chapter_4.pptx
 
Unit 4 chapter - 8 Transaction processing Concepts (1).pptx
Unit 4 chapter - 8 Transaction processing Concepts (1).pptxUnit 4 chapter - 8 Transaction processing Concepts (1).pptx
Unit 4 chapter - 8 Transaction processing Concepts (1).pptx
 
Database System Concepts AND architecture [Autosaved].pptx
Database System Concepts AND architecture [Autosaved].pptxDatabase System Concepts AND architecture [Autosaved].pptx
Database System Concepts AND architecture [Autosaved].pptx
 
Evolution Of WEB_students.pptx
Evolution Of WEB_students.pptxEvolution Of WEB_students.pptx
Evolution Of WEB_students.pptx
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
 
Algorithm.pptx
Algorithm.pptxAlgorithm.pptx
Algorithm.pptx
 
Control_Statements_in_Python.pptx
Control_Statements_in_Python.pptxControl_Statements_in_Python.pptx
Control_Statements_in_Python.pptx
 
Python_Functions_Unit1.pptx
Python_Functions_Unit1.pptxPython_Functions_Unit1.pptx
Python_Functions_Unit1.pptx
 
parts_of_python_programming_language.pptx
parts_of_python_programming_language.pptxparts_of_python_programming_language.pptx
parts_of_python_programming_language.pptx
 
linked_list.pptx
linked_list.pptxlinked_list.pptx
linked_list.pptx
 
matrices_and_loops.pptx
matrices_and_loops.pptxmatrices_and_loops.pptx
matrices_and_loops.pptx
 
algorithms_in_linkedlist.pptx
algorithms_in_linkedlist.pptxalgorithms_in_linkedlist.pptx
algorithms_in_linkedlist.pptx
 
Control_Statements.pptx
Control_Statements.pptxControl_Statements.pptx
Control_Statements.pptx
 

Recently uploaded

“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...jaredbarbolino94
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxAvyJaneVismanos
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 

Recently uploaded (20)

9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...Historical philosophical, theoretical, and legal foundations of special and i...
Historical philosophical, theoretical, and legal foundations of special and i...
 
Final demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptxFinal demo Grade 9 for demo Plan dessert.pptx
Final demo Grade 9 for demo Plan dessert.pptx
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 

DBMS_UNIT_1.pdf

  • 2. DATABASE AND DATABASE USERS Basic Definitions : Data :  Data is a Representation of facts, figures, statistics etc. having no particular meaning.  Data can be in the form of numbers, characters, symbols, or even pictures.  Ex:  1,ABC,19 etc. Information :  It is a processed data (or) Collection of data which is having perfect meaning is called information. Field:  A field is a single piece of information, a record is one complete set of fields and a file is a collection of records. EX: Telephone book is analogous to file. It contains a list of records , each of which consist of three fields : Name, Address, And telephone numbers.
  • 3. Database :  A database is an collection of related data(information) that is organized So that it can easily be accessed,managed,and Updated. Examples: University Database Data: Departments,Students,Exams,Rooms etc.. Usage: Create Exam plans,Enter Exam Results, create Statistics and Build Timetable Bank Database Data: Clients,Accounts,Credits,Funds etc.. Applications: Accounting,Transfers.Risk management Airline Database Data: Flights,Passengers,Employees,Airplanes Etc… Applications: Reservation,Booking,CreatingFlight Schedule.
  • 4. Database System :  A database system is a way of organizing information on a computer , implemented by a set of computer programs. Data Base Management System (DBMS) :  It is a collection of programs that enables user to create and maintain a database.  In other words it is general-purpose software that provides the users with the processes of defining, constructing and manipulating the database for various applications. Ex: Computerized library Systems Automated teller machines Flight reservation Systems
  • 5. FUNCTIONALITIES OF DATA BASE Defining A Database :  Defining a database involves specifying the Data types, structures, and constraints of the data to be stored in the database. Constructing A Database:  constructing the database is the process of storing data on some storage medium that is controlled by the DBMS. Manipulating A Database:  Manipulating A Database includes functions such as Querying the database to retrieve specific data, updating the database and generating from the data. Sharing:  Allows multiple users to access the database simultaneously.
  • 6. PROPERTIES OF THE DATABASE : There are three properties: 1. A database represents some aspects of the real world. 2. A database is a logically coherent collection of data with some inherent meaning. 3. A database is designed, built, and populated with data for a Specific purposes.
  • 7.  Example of a simple database: Student Course Grade Report Name Rollno Class Department Somu 1 A CS Raju 2 B CS Radha 3 C ECE Subject name Subject code Department CA DCCA101 CS DBMS DCCA102 CS Accounts DCCA103 COMMERCE Rollno Course no Grade 1 Cs01 A 2 Cs02 B 3 Com3 B
  • 8. MAIN CHARACTERISTICS OF THE DATABASE APPROACH Self-describing nature of a database system:  A DBMS catalog stores the description of a particular database (e.g. data structures, types, and constraints)  The description is called meta-data.  This allows the DBMS software to work with different database applications. Insulation between programs and data:  Called program-data independence.  Allows changing data structures and storage organization without having to change the DBMS access programs.
  • 9. Support of multiple views of the data:  Each user may see a different view of the database, which describes only the data of interest to that user.  Ex:  For example, one user of the student database may be interested only in accessing and printing the transcript of each student and another user may be interested only in checking which course the students enrolled. Sharing of data and multi-user transaction processing:  Allow multiple users to access the database at the same time.  Concurrency control software–  Ensure that several users trying to update the same data do so in a controlled manner.  Result of the updates is correct.
  • 10. • OLTP (Online Transaction Processing) is a major part of database applications. This allows hundreds of concurrent transactions to execute per second. • Ex: • For example, when several reservation clerks try to assign a seat on a particular train, the DBMS should ensure that each seat can be accessed by only one clerk at a time for assignment to a passenger. Data Abstraction:  Data abstraction is the method of hiding the unimportant details that are present in the database from the end users to make the accessing of data easy and secure.
  • 11. DIFFERENT PEOPLE BEHIND DBMS  These apply to "large" databases, not "personal" databases that are defined, constructed, and used by a single person via, say, Microsoft Access.  There are two categories of people behind DBMS i. Actors on the Scene ii. Workers behind the scene  Actors on the Scene: They actually use and control the database content; and design, develop and maintain database applications  Database Administrators  Database Designers  End-users  System Analysts, Application Programmers,( Software Engineers)
  • 12. Database Administrator (DBA):  DBA is a person who is responsible for authorizing access to the database, coordinating and monitoring its use, and acquiring software and hardware resources as needed.  The DBA will then create a new account id and password for the user if he/she need to access the data base.  DBA is also responsible for providing security to the data base and he allows only the authorized users to access/modify the data base.  DBA also monitors the recovery and back up and provide technical support.  DBA repairs damage caused due to hardware and/or software failures. Database Designers:  Database Designers are responsible for identifying the data to be stored in the database and for choosing appropriate structures to represent and store the data.  They must communicate with the end-users and understand their needs.
  • 13. End Users:  These are persons who access the database for querying, updating, and generating reports. They are categorized as:  Casual end-users: occasionally access the database, but they may need different information each time.  Naive or parametric end-users: constantly update and query databases, using standard types of queries and updates. They don’t have any DBMS knowledge but they frequently use the data base applications in their daily life to get the desired results.  Example: Bank clerks, Reservation clerks etc.  Sophisticated end-users :Sophisticated users can be engineers, scientists, business analyst, who are familiar with the database. They can develop their own data base applications according to their requirement. 1 `1
  • 14.  They don’t write the program code but they interact the data base by writing SQL queries directly through the query processor.  Stand-alone end-users: maintain personal databases by using easy- to-use ready-made program packages. System Analysts, Application Programmers, Software Engineers:  System Analysts: Determine needs of end users, especially naive and parametric users, and develop specifications for canned transactions that meet these needs.  They check whether all the requirements of end users are satisfied.  Application Programmers: Application Program are the back end programmers who writes the code for the application programs.  They are the computer professionals.  These programs could be written in Programming languages such as Visual Basic, Developer, C, FORTRAN, COBOL etc.
  • 15. Workers Behind the Scene:  Those who design and develop the DBMS software and related tools. 1)DBMS system designers/ implementers : are persons who design and implement the DBMS Module, and interfaces as a Software package. 2) Tool developers: include person who design and implement tools –the software packages that facilitate Database system design and use that help improve performance. 3) 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. Responsible for the day-to- day operation of the system.
  • 16. Advantages of using DBMS Approach : 1.Controlling Redundancy  The Database Management System will not allow storing the redundant data (same data multiple times) in the database.  The redundancy in storing the same data multiple times leads to several problems.  storage space is wasted when the same data is stored repeatedly.  Files that represent the same data may become inconsistent and etc. 2.Restricting Unauthorized Access:  The Database Management System restricts unauthorized access of the database by enforcing restrictions such as providing a password for an authorized person to access the data.
  • 17. 3.Providing Persistent Storage for Program Objects  Databases can be used to provide persistent storage for program objects and data structures. 4. Providing Storage Structures for Efficient Query Processing  Database systems must provide capabilities for efficiently executing queries and updates. 5. Providing Backup and Recovery  A DBMS must provide facilities for recovering from hardware or software failures. 6. Providing Multiple user interface  Many types of users use the database , A DBMS should provide variety Of User interfaces. 7.It Allows the Data Sharing  A Database allows the sharing of data under its control by any number of application programs or users. 8. It ensures data integrity  Data integrity means that the data contained in the database is both accurate and consistent. 9.
  • 18. Representing complex relationships among data. 10. The Data base management system (DBMS) helps to produce quick answers to database queries thus making data accessing faster and more accurate. Disadvantages of DBMS :  Cost of Hardware & Software  Cost of Data Conversion  Cost of Staff Trailing  Appointing Technical Staff  Database Damage
  • 19. A Brief History of Database Applications: Early Database Applications Using Hierarchical and Network Systems:  Large numbers of records of similar structure.  One of the main problems with early database systems was not flexible to develop new queries and reorganizing the data was so difficult.  Another shortcoming of early systems was that they provided only programming language interfaces. Providing Data Abstraction and Application Flexibility with Relational Databases:  Relational databases were originally proposed to separate the physical storage of data from its conceptual representation and to provide a mathematical foundation for data representation and querying.  The relational data model also introduced a "high-level query language" (SQL) that provided an alternative to programming language interfaces, making it much faster to write new queries.  Relational databases now exist on almost all types of computers, from small personal computers to large servers.
  • 20. Object-Oriented Applications and the Need for More Complex Databases:  object-oriented databases (OODBs) were considered a competitor to relational databases, since they provided more general data structures.  Used in specialized applications: engineering design, multimedia publishing, and manufacturing systems. Interchanging Data on the Web for E-Commerce Using XML:  In the 1990s, electronic commerce (e-commerce) emerged as a major application on the Web.  A variety of techniques were developed to allow the interchange of data on the Web.  Currently, extended Markup Language (XML) is considered to be the primary standard for interchanging data among various types of databases and Web pages.
  • 21. Extending database capabilities for new applications 1. Extensions to better support specialized requirements for applications 2. Enterprise resource planning (ERP) 3. Customer relationship management (CRM) Databases versus information retrieval  Information retrieval (IR)  Deals with books, manuscripts, and various forms of library-based articles.
  • 22. When not to use a DBMS : a) Main costs of using a DBMS: i) High initial investment and possible need for additional hardware. ii) Overhead for providing generality, security, concurrency control, recovery, and integrity functions. b) When a DBMS may be unnecessary: i) If the database and applications are simple, well defined and not expected to change. ii) If there are stringent real-time requirements that may not be met because of DBMS overhead. iii)If access to data by multiple users is not required. c) When no DBMS may be sufficient: i) If the database system is not able to handle the complexity of data because of modeling limitations . ii) If the database users need special operations not supported by the DBMS.
  • 23. Database Administrators (DBA):  The DBA is responsible for authorizing access to the database, for Coordinating and monitoring its use and for acquiring software and hardware resources as needed.  These are the people, who maintain and design the database daily. DBA is responsible for the following Issues: o Design of the conceptual and physical schemas: • The DBA is responsible for interacting with the users of the system to understand what data is to be stored in the DBMS and how it is likely to be used. • The DBA creates the original schema by writing a set of definitions and is Permanently stored in the 'Data Dictionary.
  • 24.  Security and Authorization:  The DBA is responsible for ensuring the unauthorized data access is not permitted.  The granting of different types of authorization allows the DBA to regulate which parts of the database various users can access.  Storage structure and Access method definition:  The DBA creates appropriate storage structures and access methods by writing a set of definitions, which are translated by the DDL compiler.  Data Availability and Recovery from Failures:  The DBA must take steps to ensure that if the system fails, users can continue to access as much of the uncorrupted data as possible. The DBA also work to restore the data to consistent state.  Database Tuning:  The DBA is responsible for modifying the database to ensure adequate Performance as requirements change.  Integrity Constraint Specification:  The integrity constraints are kept in a special system structure that is consulted by the DBA whenever an update takes place in the system.
  • 26. 2.1 Data Model:  A data model is a collection of concepts that can be used to describe the structure of a database.  By structure of a database we mean the data types, relationships and constraints that apply to the data.  It defines the data elements and the relationships between the data elements.  Data Models are used to show how data is stored, connected, accessed and updated in the database management system.  Though there are many data models being used nowadays but the Relational model is the most widely used model.  Data model can be Categorized in multiple ways.
  • 27. High-level or conceptual data models :  high level or conceptual model is the User level data model .  This provides concepts that are close to the way that many users perceive data.  Conceptual data models use concepts such as entities, attributes, and relationships.  Entity: Represents a real world object such as Student, Employee.  Attribute: Represents property of interest that describes an entity, such as name or Salary  Relationships: Relationships among two or more entities. Low level-Physical data models:  provides concepts that describe the details of how data is stored in the computer model.  Low level data model is only for Computer specialists not for end-user. Representation data model:  provide concepts that describe the details of how data is stored on the computer storage media, typically magnetic disks.  Physical data models describe how data is stored as files in the computer by representing information such as record formats, record orderings, and access paths.
  • 28. Types of Data Models : 1. Hierarchical Model 2. Network Model 3. Relational Model 4. Object-oriented Data Models 5. Object-Relational Models Hierarchical Model: 1. Hierarchical Model was the first DBMS model.This model organizes the data in the hierarchical tree structure. 2. 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.
  • 29.  The data here is organized in a tree-like structure where the one- to many relationship is between the data types.  Also, there can be only one path from parent to any node.  Each child node has a parent node but a parent node can have more than one child node.  Multiple parents are not allowed.  If a parent node is deleted then the child node is automatically deleted.  Pointers are used to link the parent node with the child node and are used to navigate between the stored data.
  • 30. Advantages:  Any change in the parent node is automatically reflected in the child node so, the integrity of data is maintained Disadvantages:  Complex relationships are not supported.
  • 31. 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.  In this model, as there are more relationships so data is more related.  This model has the ability to manage one-to-one relationships as well as many-to many relationships.  As there are more relationships so there can be more than one path to the same record.  This makes data access fast and simple.
  • 32.  The operations on the network model are done with the help of the circular linked list.  The current position is maintained with the help of a program and this position navigates through the records according to the relationship. Advantages of Network Model :  The data can be accessed faster as compared to the hierarchical model.  Network model and there can be more than one path to reach a particular node. Disadvantages of Network Model :  As more and more relationships need to be handled the system might get complex.
  • 33.
  • 34. 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.  Each row in the table is called tuple.  A row contains all the information about any instance of the object.
  • 35.  Attribute or field:Attributes are the property which defines the table or relation.  In the above example, we have different attributes of the employee like Salary, Mobile_no, etc.
  • 36. Advantages of Relational Model :  Simple: This model is more simple as compared to the network and hierarchical model. Disadvantages of Relational Model :  Hardware Overheads: For hiding the complexities and making things easier for the user this model requires more powerful hardware computers and data storage devices.
  • 37. 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.  In this model, two are more objects are connected through links.  We use this link to relate one object to other objects.  This can be understood by the example given below.
  • 38. Object-oriented Data Model consist of the following object oriented Concepts: 1.Object: The real world entities and situations are represented as objects in the object oriented database model. 2.Attributes and Methods: Every object has certain characteristics .They are represented using attributes. 3.Class: Similar attributes and methods are grouped together using a class.An object can be called Instance of the class. 4. Inheritance:A new class can be derived from the original class.
  • 39.
  • 40.  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.  The Behaviour of the objects is represented using methods.  Similar attributes and methods are grouped together using a Class.
  • 41. Object-Relational Models :  An Object relational model is a combination of a Object oriented database model and a Relational database model.  So, it supports objects, classes, inheritance etc. just like Object Oriented models and has support for data types, tabular structures etc. like Relational data model.  One of the major goals of Object relational data model is to close the gap between relational databases and the object oriented practices frequently used in many programming languages such as C++, C#, Java etc. The advantages of the Object Relational model are − Inheritance  The Object Relational data model allows its users to inherit objects, tables etc.
  • 42. Complex DataTypes  Complex data types can be formed using existing data types Extensibility  The functionality of the system can be extended in Object relational data model. Disadvantages of Object Relational model  The object relational data model can get quite complicated and difficult to handle at times as it is a combination of the Object oriented data model and Relational data model and utilizes the functionalities of both of them.
  • 43. 2.2 Schema and Instances: Database Schema: A database schema represents the logical view of the entire database.  It defines how the data is organized and how the relations among them are associated.  Schemas provide a logical classification of objects in the database.  A schema can contain tables, views, triggers, functions, packages, and other objects.  A database schema defines its entities and the relationship among them.  It contains a descriptive detail of the database, which can be depicted by means of schema diagrams.  It’s the database designers who design the schema to help programmers understand the database and make it useful.
  • 45.  From the above schema diagram student and Grade report are related and course and prerequisite and section are related. DBMS Instance :  The data stored in database at a particular moment of time is called instance of database.  Database State: Refers to the content of a database at a moment in time.  Initial Database State: Refers to the database state when it is initially loaded into the system.  Valid State:A state that satisfies the structure and constraints of the database.
  • 46.
  • 47. 2.3 SIMPLIFIED DATABASE SYSTEM :  A database system is Computer-Based system to record and maintain the information.A Database Management System consists of a collection of inter-related data and a set of program to access those data.  The database and the DBMS software together is a Database system.  It consists of the following 1. User/Programmers 2. Applications programs/Queries 3. Software to process Queries/programs 4. Software to Access stored data 5. DBMS Catalog Contains the Stored database definition (Metadata) 6. The Physical Stored database
  • 48. A Simplified Database System Environment
  • 49.  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  The collection of data, usually referred to as the database, contains information about one particular enterprise.  The primary goal of DBMS is to provide an environment that is both convenient and efficient to use in retrieving and storing database information  This system involves the control of how databases are Created, interrogated and maintained to provide information needed by end users and the organization.  DBMS acts as the interface between the application programs and database.  There are many different types of DBMS, ranging from small systems that run on personal computers to huge systems that run on mainframes.  Ex: Computerized library system
  • 50. 2.4 DBMS Architecture :  Every database system logically organizes data with respect to some model is called Data model.A Data model describes how various pieces of data in the database are logically related to each other  The data model represents the relationship between entities. The database model is also well known as Database Architecture.  The structure of a DBMS may be analyzed in two separate architectures  Logical DBMS Architecture  Physical DBMS Architecture.
  • 51. 2.4.1 Logical DBMS Architecture (Three Schema/Level DBMS Architecture):  The three schema architecture is also calledANSI/SPARC architecture or three-level architecture.  The logicalArchitecture describes how data in the database is perceived by users.  It is now concerned with how the data is handled and processed by the DBMS, but only with how it looks.  The goal of theThree-schema architecture is to separate the user application from the physical database.  In this architecture, schemas can be defined at the following three levels  There are following three levels or layers of DBMSArchitecture  External Level  Conceptual Level  Internal Level
  • 52. 2.4.1.1 Three Schema Architecture:
  • 53. Physical level (or InternalView / Schema): The lowest level of abstraction describes how the data are actually stored.  The physical level describes physical storage structure of the database.  Essentially, the physical schema summarizes how the relations described in the conceptual schema are actually stored on secondary storage devices such as disks and tapes. Logical level (or ConceptualView / Schema): The next-higher level of abstraction describes what data are stored in the database, and what relationships exist among those data.  The logical level thus describes the entire database in terms of a small number of relatively simple structures.  It hides physical storage details, concentrating upon describing entities, data types, relationships, user operations, and constraints.  Database administrators, who must decide what information to keep in the database, use the logical level of abstraction.
  • 54. View level (or ExternalView / Schema): The highest level of abstraction Describes the various user views..  It describes the part of the database that a particular user group is interested in and hides the rest of the database from that user group.  Usually a high-level model is used here. 2.4.1.2 Mapping:  The processes of transforming requests and results between levels are called mappings.  In a DBMS based on the three-schema architecture, each user group refers to its own external schema.  Hence, the DBMS must transform a request specified on an external schema into a request against the conceptual schema, and then into a request on the internal schema for processing over the stored database.  If the request is a database retrieval, the data extracted from the stored database must be reformatted to match the user’s
  • 55.  There are basically two types of mapping in the database architecture: ◦ External/conceptual mapping ◦ Conceptual/ internal mapping Conceptual/ Internal Mapping  The Conceptual/ Internal Mapping lies between the conceptual level and the internal level. Its role is to define the correspondence between the records and fields of the conceptual level and files and data structures of the internal level. External/ Conceptual Mapping  The external/Conceptual Mapping lies between the external level and the Conceptual level. Its role is to define the correspondence between a particular external and the conceptual view.
  • 56. 2.4.2 Physical DBMS Architecture The physicalArchitecture describes the software components used to enter and process data, and how these software components are related and interconnected. The physical DBMSArchitecture divided into 2 parts:  Back end  Front end Back end:  The back end is responsible for managing the physical database and providing necessary support and mappings for the internal, conceptual levels.  Other benefits of DBMS, such as Security, integrity and access control are also responsibility of the back end Front end:  The Front end is really an application that runs on the top of the DBMS.These may be applications provided by the DBMS vendor, the use of the third party.  The user interact with the front end and may not even be aware that the back end exists.
  • 57. 2.5 DATA – INDEPENDENCE  Data Independence is defined as a property of DBMS that helps you to change Database Schema at one level of a database system without requiring to change the Schema at the next higher level.  Data Independence is one of the main advantages of DBMS  The ability to modify a schema definition in one level without affecting Schema definition in the next higher level is called “Data Independence”  There are two kinds of Data Independence  1. Physical Data Independence  2. Logical Data Independence
  • 58.  Logical Data Independence: The capacity to change the conceptual schema without having to change the external schemas and their application programs. Logical data independence is required as it-  Makes sure that if the table is modified, the data should not be affected.  Absorbs the changes made because of the mapping between the external and conceptual levels. Examples of Logical Data independence Changes  Dividing an existing record into two or more.  To merge records into a single one.  Adding/ Updating/ Deleting a new entity, relationship, or attribute.
  • 59.  Physical Data Independence: The capacity to change the internal schema without having to change the conceptual schema. Hence, the external schemas need not be changed as well. Physical data independence is required as it -  Allows the user to design the database logically.  Allows us to modify the physical devices without affecting the conceptual mapping. Examples of Physical Data independence Changes  Switching to new storage like a hard drive or magnetic tapes.  The location change of the database from one drive to another. (like C drive to D drive).  To modify the file organization technique.
  • 60.
  • 61. 2.6 Database Languages:  Database Languages: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. Types of Database Language:
  • 62. 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.  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.  The data definition language (DDL) is used by the DBA and by database designers to define both schemas when no strict separation of levels is maintained .  The DBMS will have a DDL compiler whose function is to process DDL statements in order to identify descriptions of the schema constructs and to store the schema description in the DBMS catalog.
  • 63. Storage Definition Language (SDL):  The storage definition language (SDL), is used to specify the internal schema.The mappings between the two schemas may be specified in either one.  View Definition Language (VDL),View definition language is used to specify user views and their mappings to the conceptual schema. 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.  Comment: It is used to comment on the data dictionary. These commands are used to update the database schema that's why they come under Data definition language.
  • 64. 2. Data Manipulation Language :  DML stands for Data Manipulation Language.  It is used for accessing and manipulating data in a database.  Data manipulation languages (DML) are used to perform manipulation operation such as retrieval, insertion, deletion, and modification of the data. 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.  Call: It is used to call a structured query language or a Java subprogram.  Explain Plan: It has the parameter of explaining data.  LockTable: It controls concurrency.
  • 65. 3. Data Control 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.) Here are some tasks that come under DCL:  Grant: It is used to give user access privileges to a database. Grant to allow specified users to perform specified tasks.  Revoke: It is used to take back permissions from the user. There are the following operations which have the authorization of Revoke: CONNECT, INSERT, USAGE, EXECUTE, DELETE, UPDATE and SELECT
  • 66. 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 underTCL:  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.
  • 67. 2.7 DBMS Interfaces Interfaces are the programs which convert system language to user understandable language and user language to system understandable language. So its work likes a translator which provides an environment in which a user can easily operate the system Types of interfaces provided by the DBMS include  Menu-Based interface for web clients or browsing  Forms-based interfaces  GUI’s  Natural Language interfaces  Interfaces for parametric users  Interfaces for the DBA
  • 68.  Menu-Based interface for web clients or browsing: These interfaces are used by the stand-alone users.These interfaces present a set of options called menu to the users, from which user can select an option  Forms-based Interfaces: These are used by the parametric users. In this type a form is displayed to the user. User has to fill all the information required through form fields.  Graphical user Interfaces (GUI’s): these are used by both user, by parametric and by stand alone user. Both Form based and Menu based is called GUI. Displays a schema to the user in diagram form.The user can select his/her options using a mouse pointer.  Natural language Interfaces: these Interfaces are used by the Sophisticated users.This includes commands in English and it will have its own Schema  Interfaces for Parametric users: parametric users have small set of operations they perform.Analyst and programmers design and implement a special interface for each class of naive users.  Interfaces for the DBA: Systems contain privileged commands only for DBA staff. Including commands for creating accounts, authorizing accounts, reorganizing the storage structure etc.
  • 69. 2.8 Database System Environment The term database system refers to an organisation of components that define and regulate the collection, storage, management, and use of data within a database environment. In high level view the database system is composed of the following five major components:  Hardware Components in a database System Environment  Software Components in a database System Environment  People in a Database System Environment  Procedure in a Database Environment  Data in the Database 1. Hardware Components in a database System Environment Hardware identifies all the system’s physical devices. It includes computers, computer peripherals, network components etc
  • 71. 2. Software Components in the database system Environment To make the database system work properly, three types of software are needed: Operating system, DBMS Software, and Application programs.  Operating System: It manages all hardware components and allow other software to run on the computers. Ex:Windows, Linux and etc  DBMS Software: It manages the database within the database system. Some example of DBMS software include Oracle, Access, MySql etc  Application programs: These are used to access and manipulate data in the DBMS and to manage the computer environment in which data access and manipulation take place.  Application programs are most commonly used to access data to generate reports.  Most of the application programs provide GUI.
  • 72. 3. People in Database System Environment: It includes all users associated with the database system. On the basis of primary job function we can identify five types of users in a database system. System Administrator: They supervise the database system’s general operations. Database Administrators: They are also known also as DBA’s. They manage the DBMS and ensure that the database is function properly. Database Designers: They design the database structure.They are database architects. Systems Analyst and programmers: They design and implement the application programs. End users: are the people who use the application. Ex: Sales- clerks, supervisors, managers are classified as end users.
  • 73. 4. Procedure in a Database Environment  Procedures are the instructions and business rules that govern the design and use of the database system.  Procedures are critical component of the system. Procedures play an important role in a company because they enforce the standards by which business is conducted in an organisation. 5. Data in the Database  Data are the very important basic entity in a database.  It is the collection of facts stored in the database.  Data is the raw material from which information is generated
  • 74. 2.9 Centralized DBMS Architecture  “ A Centralized DBMS in which all the DBMS functionality, application program execution and user interface processing were carried out on a single machine.”  Used mainframe Computers are used for processing all system functions including user application programs, user interface programs and DBMS functionalities.  The reason was that most users accessed such systems via computer terminals that did not have processing power and only provided display capabilities.  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 the central computer via various types of communications networks.
  • 75.
  • 76. 2.10 Client/Server Architectures :  The client/server architecture was developed to deal with computing environments in which a large number of PCs, workstations, file servers, printers, database servers,Web servers, e-mail servers, and other software and equipment are connected via a network.  Client – a user machine that provides user interface capabilities and local processing  Server – machine that provides services to client machines such as file access, printing, and database access.  The idea is to define specialized servers with specific functionalities.  File server that maintains the files of the client machines.  Another machine can be designated as a printer server by being connected to various printers; all print requests by the clients are forwarded to this machine.  Web servers or e-mail servers also fall into the specialized server category
  • 77. 2. 10. 1TwoTier Client-Server Architecture :  User Interface Programs and Application Programs run on the client side when DBMS Access is needed.  The query and transaction functionality related to SQL processing remained on the server side.  Interface called ODBC (Open Database Connectivity) provides an Application program interface (API) allow client side programs to call the DBMS.  The program establishes a Connection to the DBMS on the Server side. Once the Connection is created, the client can Communicate with the DBMS.  In a new approach, primarily adopted by OODBMS, client programs perform more work including data dictionary functions, query optimization and others.
  • 78.
  • 79. 2.10.2 Three Tier Client-Server Architecture
  • 80.  Client - Contain GUI interfaces and some additional application- specific business rules.  Application Server or theWeb Server -Accepts requests from the client, processes the request and sends database queries and commands to the database server, and then passes processed data from the database server to the clients, where it may be processed further and filtered to be presented to users in GUI format. - It can also improve database security by checking client’s credentials before forwarding a request from the database server.  Presentation Layer: Displays information to the user and allows data entry.  The business Logic Layer: - Handles intermediate rules and constraints before data is passed up to the user or down to the DBMS. - Can also act as aWeb server, which retrieves query results from the database server and formats them into dynamicWeb pages that are viewed by theWeb browser at the client side  The bottom Layer: Includes all the data management services
  • 81. 2.11 Distributed DBMS  A Distributed Database is a single logical database that is spread physically across computers in multiple locations that are connected by a data communications network.  A DDB is a collection of logically related data distributed across several machines interconnected by a computer network.  An application program operating on a DDB may access data stored at more than one machine  A set of co-operating databases, each resident at a different site that the user views and manipulates as a centralized database “A Distributed DBMS (DDBMS) is a software system that permits the management of the distributed database and make the distribution transparent to users”
  • 83. Advantages of Distributed DBMS  Naturally distributed data  Reliability and availability  Controlled data sharing  Improved performance Disadvantages of Distributed DBMS  Complexity  Cost, Security  Lack of standard and Experience  Database design is more Complex
  • 84. 2.12 Difference between Centralized & Distributed database
  • 85. 2.13 Classification of DBMS The DBMS can be classified into different categories on the basis of several criteria such as the data model they are using, number of users they support, number of sites over which the database is distributed and purpose they serve. 1.Data Model Classification  Relational data model  Hierarchical data model  Network data model  Object-Oriented data model  Object-Relational data model 2.Number of Users  Single User System – Single user system the database resides on one computer and only accessed by one user at a time  Multiuser system – multiuser can access the database simultaneously. In multiuser DBMS, the data is both integrated and shared
  • 86. 3. Number of sites  Centralized – data is stored in single site  Distributes – Database & dbms software stored over many sites connected by network  Homogeneous – use same dbms software at multiple sites  OnlineTransaction processing(OLTP) – Used for data entry and retrieval. Ex: Banking, airlines etc 4.Cost  Low-end system under $3000  High-end system, over $100,000 5. Purpose  General purpose  Special Purpose DBMS is a general purpose software system. It can be designed for specific purposes such as airline or railway reservation.