0% found this document useful (0 votes)
14 views

Introduction to Data Base Management System

This PPT includes an introduction to the Database Management System (DBMS) and a basic explanation of Entity-Relationship (ER) diagrams with examples

Uploaded by

Sandeep Y
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Introduction to Data Base Management System

This PPT includes an introduction to the Database Management System (DBMS) and a basic explanation of Entity-Relationship (ER) diagrams with examples

Uploaded by

Sandeep Y
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 44

Data Base Management

System
 A database: is a collection of related data.
 Database Management System (DBMS) :is a computerized
system that enables users to create and maintain a database.
 The DBMS is a general-purpose software system that facilitates the
processes of defining, constructing, manipulating, and sharing
databases among various users and applications.
 Defining a database involves specifying the data types, structures,
and constraints of the data to be stored in the database.
 The database definition or descriptive information is also stored by
the DBMS in the form of a database catalog or dictionary; it is called
meta-data
 Constructing the database is the process of storing the data on
some storage medium that is controlled by the DBMS
 Manipulating a database includes functions such as querying the
database to retrieve specific data, updating the database to reflect
changes in the miniworld, and generating reports from the data.
 Sharing a database allows multiple users and programs to access
the database simultaneously.
 Ex:
 Characteristics of the Database Approach:
1. Self-Describing Nature of a Database
System:
A fundamental characteristic of the database it
provide a complete definition or description of the
database structure and constraints.
This definition is stored in the DBMS catalog
Which contains information such as the
structure of each file, the type and storage format of
each data item, and various constraints on the data.
The information stored in the catalog is called
meta-data
 Insulation between Programs and Data, and
Data Abstraction
The structure of data files is stored in the DBMS
catalog separately from the access programs.
 Support of Multiple Views of the Data:
 A database typically has many types of user database for that
may require different perspective or view of data
 Sharing of Data and Multiuser Transaction
Processing:
 A multi-user DBMS as its name implies, must allow multiple users to
access the database at the same time
ACTORS ON THE SCENE
 Database Administrators :
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.
 Database Designers :
Database designers are responsible for identifying the data
to be stored in the database and for choosing the appropriate
structure to represent and store this data.
 End Users:
 End users are the people whose jobs require access to the
database for querying, updating and generating reports.
1. Casual End Users:
They occasionally access the database, but they may need
different information each time.
2. Parametric End Users:
Their main job function revolves around constantly querying
and updating the database, using standard types of queries.
3. Sophisticated End Users:
This category includes engineers, scientist’s business
analysts etc.
4. Stand-alone End Users:
They maintain personal databases by using readymade
program packages that provide easy-to-use menu or graphics-
based interfaces.
 System Analysts and Application Programmers
(Software Engineers) :
System analysts determine the requirements of
the end-users and develop specifications for canned
transactions that meet these requirements.
 WORKERS BEHIND THE SCENE
1. DBMS system designers and implementers:
persons who design and implement the DBMS
modules and interfaces as a software package
A DBMS is a very complex software system that
consists of many components, or modules, including
modules for implementing the catalog, query language,
interface processors, data access, concurrency control,
recovery and security
2. Tool developers :
the software packages that facilitate database
system design and use and that help improve performance.
3. Operators maintenance personnel :
who are responsible for the actual running and
maintenance of the hardware and software environment for
the database system.
ADVANTAGES OF USING A DBMS
 Controlling Redundancy:
Redundancy is nothing but storing same data repeatedly
In database approach a huge repository of data is stored
and users are allowed to access the data which is relevant to
them there by controlling the redundancy.
 Unauthorized Access
When multiple users share a database, it is likely that
some users will not be authorized to access all information in
the database
 Providing Persistent Storage for Program Objects
Databases can be used to provide persistent storage for
program objects and data structures so that the user of the
database can store any amount of data in the database for
further use.
 Providing Storage Structures and Search Techniques
for Efficient Query Processing
Database is typically stored on disk, the DBMS must
provide specialized data structures and search techniques to
speed up disk search for the desired records
 Providing Backup and Recovery:
A DBMS must provide facilities for recovering from
hardware and software failures. The backup and recovery
subsystem of the DBMS is responsible for recovery.
 Providing Multiple User Interfaces:
Because many types of users with varying levels of
technical knowledge use a database, a DBMS should provide
a variety of user interfaces
 Representing Complex Relationships among Data:
A database may include numerous varieties of data that
are interrelated in many ways.
 Enforcing Integrity Constraints :
Most database applications have certain integrity
constraints that must be enforced on the data to be
stored in the table.
 Permitting Inferencing and Action Using Rules :
Database systems provide capabilities for
defining deduction rules for inferencing new
information from the stored databases facts.
 Implications of Using the Database Approach:
a. Potential for Enforcing Standards:
The database approach permits DBA to define
and enforce standards among database users in an
organization.
b. Reduced Application Development Time:
NEW APPLICATIONS CAN BE DEVELOPED USING DBMS WITH LESS
EFFORT
Designing and implementing a new database from
the scratch is a time-consuming process
c. Flexibility:
Modern DBMSs allow certain types of changes to
the structure of the database without affecting the
stored data and the existing application programs.
d. Availability of Up-to-Date Information
DBMS is up-to-date if any changes may occurred
in one end it shows same impact to all accessors
e. Economics of Scale: The DBMS approach permits
consolidation of data and applications, thus
reducing the amount of wasteful overlap.
Database System Concepts
and Architecture
 Data abstraction: generally, refers it stores details of data
organization and storage and highlights some essential
features of data
 A data model—a collection of concepts that can be used to
describe the structure of a database
Categories of Data Models
 High-level or conceptual data models: provide
concepts that are close to the way many users
perceive data
An entity represents a real-world object or
concept, such as an employee or a project that is
described in a database.
An attribute represents some property of
interest that further describes an entity, such as an
employee’s name or salary.
A relationship among two or more entities
represents an interaction among the entities
 low-level or physical data models: provide
concepts that describe the details of how data is
stored in the computer.

 Representational data models: which provide


concepts that may be understood by end-users,
hide some details of the data storage but can be
implemented on a computer in a direct way
Schemas, Instances & Database
State
The description of a database is called as database schema
 Most data models have certain conventions for displaying the
schemas as diagrams. A displayed schema is called a schema
diagram
THREE SCHEMA ARCHITECTURE
AND DATA INDEPENDENCE
 The internal level has an internal schema, which
describes the physical storage structure of the
database.

 The conceptual level has a conceptual schema,


which describes the structure of the whole database
for a community of us conceptual

 Each external schema 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
Data Independence

 Logical Data Independence:


It is the capacity to change the conceptual schema
without having to change the external schemas or
application programs.

 Physical Data Independence:


It is the capacity to change the internal schema
without having to change the conceptual or external
schemas
DATABASE LANGUAGES &
INTERFACES
 DBMS Languages :
1. data definition language (DDL):is used by the DBA and by
database designers to define conceptual and internal schemas.
2. Storage definition language (SDL): is used to specify the internal
schema
3. The mapping between the external and conceptual schema is
specified by a language called view definition language (VDL)
DBMS Interfaces
 Menu - Based Interfaces: These interfaces present the user with
lists of options called menus
 Forms - Based interfaces:Users can fill out all the form entries to
insert new data, or they fill out only certain entries
 Graphical-User Interfaces: A graphical user interface (GUI)
typically displays the schema to the user in diagrammatic form.
 Natural Language Interfaces: These interfaces accept requests
written in English or some other language and attempt to
understand them.
 Interfaces for Parametric Users: Parametric users such as bank
tellers, often have a small set of operations that must be perform
repeatedly
 Interfaces for the DBA: These interfaces include commands for
creating accounts, setting system parameters, granting account
authorization
THE DATABASE SYSTEM
ENVIRONMENT
Components:
 Users:
It shows interfaces for the DBA staff, casual users who work
with interactive interfaces to formulate queries, application
programmers
 DDL Statements & Privileged commands:
The DBA staff works on defining the database and tuning it
by making changes to its definition using the DDL
 DDL Compiler:
It processes schema definitions, specified in the DDL, and
stores descriptions of the schemas (meta-data) in the DBMS
catalog.
 Interactive Query:
Casual users and persons with occasional need for
information from the database interact using some form of interface
 Query Compiler:
The queries are parsed and validated for correctness of
the query syntax, the names of files and data elements
 Query Optimizer:
It is concerned with the rearrangement and possible
reordering of operations
 Application Programs:
Application programmers write programs in host
languages such as Java, C, or C++ that are submitted to a
precompile.
 Precompiler:
It extracts DML commands from an application program
written in a host programming language.
 DML Compiler: The DML commands are sent to the DML
compiler for compilation into object code for database access.
Database System Utilities
 Loading:
A loading utility is used to load existing data files such as
text files or sequential files into the database
 Backup:
A backup utility creates a backup copy of the database,
usually by dumping the entire database onto tape.
 File Reorganization:
This utility can be used to reorganize a database file into a
different file organization to improve the performance
 Performance Monitoring: Such a utility monitors database
usage and provides statistics to the DBA.
CLASSIFICATION OF DATABASE
MANAGEMENT SYSTEMS
1. First classification : based on data model
2. Second Classification: number of users
a)Single-User system
b)Multi-User System
3. Third Classification based on number of sites
a)Centralized that means if the data is stored in a single system
b)A distributed DBMS (DDBMS) can have databases distributed
over many sites.
c)Homogeneous DBMSs use the same DBMS software at all the
sites
d) heterogeneous DBMSs can use different DBMS software at
each site.
4. The fourth criterion is cost. It is difficult to propose a classification of
DBMSs based on cost.
Data Model Using the Entity-
Relationship Model
 USING HIGH-LEVEL CONCEPTUAL DATA MODELS FOR DATABASE
DESIGN
 The Entity-Relationship (ER) model is a data model that uses
diagrams to represent the logical structure of a database
ENTITY TYPES, ENTITY SETS,
ATTRIBUTES AND KEYS
The ER model describes data as entities, relationships, and
attributes
 Entity: Entity is a thing in the real world with an independent
existence.
Ex: Car, Person
 Attribute: Attribute is a particular property that describes the
entity
Ex: Employee entity may be described by employee
name, age, address, salary and job etc.
 Types Of Attributes:
1. Composite Versus Simple (Atomic) Attributes:
Composite attributes can be divided into smaller subparts
Ex:Address attribute can be divided into StreetAddress, City,
State and Pin code
Simple or atomic attributes Attributes that are not
divisible
2. Single-Valued Versus Multi-Valued Attributes:
Attributes have a single value for a particular entity such
attributes are called as single-valued
An attribute have more than one value that attribute known
as multi valued attribute
3. Stored Versus Derived Attributes:
The age attribute is called as derived attribute. And the
Birth date attribute is called as stored attribute.
4. Null Values: In some cases, a particular entity may not have
an applicable value for an attribute
5. Complex Attributes: It is the combination of composite and
multi-valued attributes nested in an arbitrary way.
Entity Types, Entity Sets, Keys
and Value Sets
 Entity Types: An entity type defines a collection or a set of
entities that have same attributes.
 Entity Set: The collection of all entities of a particular entity
type is called as entity set
 shows a CAR entity type in this notation
 Key Attributes of an Entity: An entity type usually has an
attribute whose values are distinct for each individual entity in
the collection

 Value Sets (Domains) of Attributes: Each simple attribute


of an entity type is associated with a value set (or domain of
values)
RELATIONSHIP TYPES, SETS,
ROLES, AND STRUCTURAL

CONSTRAINTS
Relationship Types, Sets and Instances :
A relationship type R among n entity types E1,E2,E3……En
defines set of associations- or a relationship set - among entities from
these type
Degree of a Relationship Type
 The degree of relationship type is the number of participating entity
types in the relationship.
 Here WORKS_FOR relationship has degree two because two entities
participate in the relationship. Hence it is called as binary relation
 If the degree of a relation is three, then it is called as ternary relation.
 Consider example ternary relationship

You might also like