Database Management Systems
Presented by
Ch. Sri Jyothi
Teaching Instructor
UNIT-1
• Understanding the DBMS basic concepts
• Know the Applications of DBMS.
• To know the Database Designing for the real time
Objectives:
applications
www.company.com
CS201-DBMS Dept of CSE
UNIT-1
• Students will be able to know the DBMS concepts and their
importance.
• Students will be able to design the databases for any real
Outcomes::
time applications.
• Students will be able to know the constraints to be
considered while designing the databases
www.company.com
CS201-DBMS Dept of CSE
UNIT-1
1. Introduction to Database Systems
2. File System
3. Advantages of DBMS
4. DBA, Designers and End users
Topics:: 5. Data Models
• Relational Model
• Entity-Relationship Model
• Hierarchical Model
• Network Model
• Object-Oriented Model
www.company.com
CS201-DBMS Dept of CSE
Contents
6. Levels of Abstraction or Three-Schema architecture
7. DBMS architecture
8. Classification Of Database Management Systems
Topics:
9. centralized and client/server architectures for dbms
www.company.com
CS201-DBMS Dept of CSE
data
• A data mean known facts or raw facts that can be recorded
and that have implicit meaning.
Topic 1
• For example, consider the names, telephone, numbers, and
Introduction to
Database
addresses of the people you know. You may have recorded
Systems this data in an indexed address book, you may have stored it
on a hard drive, using a personal computer and software
such as Microsoft Access, or Excel.
• Information: Processed data.
www.company.com
CS201-DBMS Dept of CSE
Database
• Database is a large collection of related data that
Topic 1 can be stored generally describes activities of an
Introduction to organization.
Database Systems
www.company.com
CS201-DBMS Dept of CSE
What is a Database System?
Database System = Database + DBMS
• A Database is
• A large, integrated collection of data
• Models a real-world enterprise.
•Entities (e.g., students, courses)
• Relationships (e.g., Mary takes CS123)
• A Database Management System (DBMS) is a
software package designed to store and manage
databases easily and efficiently.
Lecture 1 Introduction 8
www.company.com
Database Properties
•
It is used to store data of an organization.
•
A database is designed and developed for a specific
Topic 1 purpose.
• It has some source from which data is derived and it is
Introduction to populated with that data.
Database Systems • It can be of any size
• It allows multiple users to share and access database at the
same time.
Eg: - University database which includes students, faculty,
courses & class rooms information along with activities such
as enrolment and teaching courses.
www.company.com
CS201-DBMS Dept of CSE
Database Management System
• A database management system (DBMS) is a collection of
Topic 1 programs (software) for defining, creating, manipulating
Introduction to and maintaining a database.
Database Systems
www.company.com
CS201-DBMS Dept of CSE
Database Management System
• The DBMS is a general-purpose software package that
Topic 1 facilitates the processes of defining, constructing,
Introduction to manipulating, and sharing databases among various users
Database Systems and applications.
www.company.com
CS201-DBMS Dept of CSE
Actions of DBMS
• Defining a database involves specifying the data types,
Topic 1 structures, and constraints for the data to be stored in the
database
Introduction to
Database Systems
• Constructing the database is the process of storing the data
itself 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,, and generating reports from the data
www.company.com
CS201-DBMS Dept of CSE
Actions of DBMS
• Sharing a database allows multiple users and programs
Topic 1 to access the database concurrently
Introduction to
Database Systems
www.company.com
CS201-DBMS Dept of CSE
Why Use a DBMS?
Suppose we need to build a university information system.
How do we
• store the data? (use file structures…)
• query the data? (write programs…)
• Update data safely? (more programs…)
• provide different views on the same data? (registrar versus
students) (more prog…)
• deal with crashes? (more prog…)
Way too complicated! Go buy a DBMS!
Lecture 1 Introduction 14
www.company.com
Simplified database system
environment
Topic 1
Introduction to
Database Systems
www.company.com
CS201-DBMS Dept of CSE
Database system (Self Describing
nature)
• A fundamental characteristic of database
approach is that the database system
contains not only the database itself but also
a complete definition or description of the
database structure and constraints
Database definition 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 above information stored in the catalog is
called meta-data
www.company.com
• DBMS software and users use the catalog to
know the structure of the database
www.company.com
Database Applications
• Banking: all transactions
Topic 1 • Airlines: reservations, schedules
Introduction to • Sales: customers, products, purchases
Database Systems
• Online retailers: order tracking, customized
recommendations
www.company.com
CS201-DBMS Dept of CSE
Database Applications:
• Manufacturing: production, inventory, orders,
supply chain
Topic 1 • Human resources: employee records, salaries, tax
deductions
Introduction to • Universities: registration, grades
Database Systems
www.company.com
CS201-DBMS Dept of CSE
File System
• Before the evolution of DBMS, File Systems are used
Topic 2 to store and manage the data.
File System
• In File System data will be stored in individual files.
• A File is a collection of data.
• Files are typically designed to meet needs of a
particular department or user group.
• Files are also typically designed to be part of a
particular computer application
www.company.com
CS201-DBMS Dept of CSE
File processing system
• In the file processing approach, each department
Topic 2 would "own" a collection of relevant data and software
applications to manipulate that data.
File System
www.company.com
CS201-DBMS Dept of CSE
Drawbacks of File System
1. Data Redundancy and Inconsistency
Topic 2 2. Difficulty in accessing data
3. Data isolation
File System
4. Enforcing Integrity constraints
5. Atomicity problems
6. Difficulty in concurrency control
7. Security Problems
www.company.com
CS201-DBMS Dept of CSE
Cont ...
Data Redundancy and Inconsistency:
• Data redundancy means appearing same data in different
Topic 2
places.
File System • In file system same information is stored at different places
it causes data-inconsistency problems during updates.
Difficulty in accessing data:
• In order to retrieve data from files we need to write special
application program every time.
• This is not a convenient way because every time the
requirements may change need to write a new program to
carry out each new task
www.company.com
CS201-DBMS Dept of CSE
Cont ...
• Data isolation: The data is scattered in different files
and with different formats. So it is difficult to write
Topic 2
application programs to retrieve the data.
File System
• Enforcing Integrity constraints: Data integrity
means, all the data has to obey some condition. In File
System integrity constraints are set at program level.
www.company.com
CS201-DBMS Dept of CSE
Cont ...
Atomicity problems:
Topic 2 • Atomicity is a property of a transaction it states that either
all actions to be performed or none.
File System
• In file processing system incomplete transactions cannot
roll back. Due to this data will be inconsistent.
Difficulty in concurrency control:
• concurrency means same file is updated by different
application programs at the same time.
• In File Processing System it is not possible to handle
concurrency because of that we can get inconsistent data
www.company.com
CS201-DBMS Dept of CSE
Cont ...
Security Problems:
Topic 2 • Since the information is scattered in different files and
does not have centralized access path, so it is not
File System possible to provide security to the data. Hence,
everyone can access the data.
www.company.com
CS201-DBMS Dept of CSE
Advantages of DBMS
Advantages of using DBMS approach and
capabilities that a good DBMS should possess:
Topic 3
1. Controlling Redundancy
Advantages of 2. Data Consistency
DBMS
3. Data Security
4. Providing Storage Structures for Efficient Query
Processing
5. Providing Backup and Recovery
6. Providing concurrency control
7. Enforcing Integrity constraints
www.company.com
CS201-DBMS 8. Report Writers Dept of CSE
Some more Advantages of DBMS
1. Self-Describing nature of a database system
Topic 3 2. Insulation between programs and data, data
abstraction
Advantages of 3. Support for multiple views of the data
DBMS
4. Sharing of data and multiuser transaction
processing
The DBA must utilize these capabilities to accomplish
variety of objectives such as design,
administration and use of a large multiuser
database
www.company.com
CS201-DBMS Dept of CSE
Controlling Redundancy
• In non-database systems (traditional computer file
Topic 3 processing), same data is stored in many places.
• Redundancy leads to several problems 1.duplication effort:
Advantages of same data can be entered multiple times 2. Storage space is
DBMS wasted. 3. Data inconsistency.
• In DBMS, all the data of an organization is integrated into a
single database.
www.company.com
CS201-DBMS Dept of CSE
Data Consistency:
• By controlling the data redundancy, the data consistency is
obtained.
Topic 3
• If a data item appears only once, any update to its value has
to be performed only once and the updated value (new value
Advantages of
of item) is immediately available to all users.
DBMS
• If the DBS has reduced redundancy to a minimum level, the
DBMS enforces consistency.
• It means that when a data item appears more than once in the
database and is updated, the DBMS automatically updates
each occurrence of a data item in the database.
www.company.com
CS201-DBMS Dept of CSE
Data Security
• Data security is the protection of the database from
Topic 3 unauthorized users.
• Only the authorized persons are allowed to access the
Advantages of database.
DBMS • Some of the users may be allowed to access only a part
of database i.e., the data that is related to them or
related to their departmentment.
www.company.com
CS201-DBMS Dept of CSE
Data Security
• Some users may be permitted only to retrieve data,
whereas others are allowed to retrieve as well as to
Topic 3 update data.
• The database access is controlled by the DBA.
• He creates the accounts of users and gives rights to
Advantages of access the database.
DBMS • Typically, users or group of users are given usernames
protected by passwords.
• Most of the DBMSs provide the security sub-system,
which the DBA uses to create accounts of users and to
specify account restrictions.
www.company.com
CS201-DBMS Dept of CSE
Providing Storage Structures for Efficient Query
Processing
• Database systems must provide capabilities to execute
Topic 3 queries and updates efficiently
• Because the database is typically stored on disk, the
Advantages of DBMS must provide specialized data structures to
DBMS
speed up disk search for the desired records.
• Auxiliary files called indexes are used for this purpose.
Indexes are typically based on tree data structures or hash
data structures.
• OS supports file manager to manage the allocation of
disk space for the Database files.
www.company.com
CS201-DBMS Dept of CSE
Providing Backup and Recovery
• Most of the DBMSs provide the 'backup and recovery'
sub-systems that automatically create the backup of data
Topic 3 and restore data if required.
• For example, if the computer system fails in the middle
(or end) of an update operation of the program, the
Advantages of recovery sub-system is responsible for making sure that
DBMS the database is restored to the state it was in before the
program started executing.
www.company.com
CS201-DBMS Dept of CSE
Providing concurrency control
• DBMS will support concurrency control tools for
Topic 3 permitting multiple users or application programs to
access the database concurrently, while preserving the
consistency of database.
Advantages of
DBMS
www.company.com
CS201-DBMS Dept of CSE
Enforcing Integrity constraints
• Integrity constraints can be applied to database so that
Topic 3 correct data can be entered in to database.
Ex: 1. minimum balance of a account is 1000
Advantages of 2. Max marks of a subject is 100
DBMS
• Most database applications have certain integrity
constraints that must hold for the data.
• A DBMS should provide capabilities for defining and
enforcing these constraints.
• The simplest type of integrity constraint involves
specifying a data type for each data item.
www.company.com
CS201-DBMS Dept of CSE
Report Writers
• Most of the DBMSs provide the report writer tools used
to create reports. The users can create reports very easily
Topic 3 and quickly.
• Once a report is created, it can be used many times and it
can be modified very easily.
Advantages of • The created reports are also saved along with database
DBMS and behave like a software component.
www.company.com
CS201-DBMS Dept of CSE
Actors of DBS
Topic 4
DBA, Designers
and End users
www.company.com
CS201-DBMS Dept of CSE
Database Administrator(DBA)
• The database administrator is a person having central
Topic 4 control over data and programs accessing the data.
• DBA coordinates all the activities of the database system
Database
Administrator • They are the users who are most familiar with the database
and are responsible for creating, modifying, and
maintaining its three levels.
• Database Administrator is responsible to manage the
DBMS’s use and ensure that the database is functioning.
www.company.com
CS201-DBMS Dept of CSE
Responsibilities of DBA
1. Installing and upgrading the database server and
application tools
Topic 4
2. Allocating system storage and planning future
storage requirements for the database system
DBA
3. Modifying the database structure, as necessary, from
information given by application developers
4. Enrolling users and maintaining system security
5. Ensuring compliance with database vendor
license agreement.
www.company.com
CS201-DBMS Dept of CSE
Responsibilities of DBA
7) Monitoring and optimizing the performance of the
Topic 4
database
8) Planning for backup and recovery of database
Responsibilities
of DBA information
9) Maintaining archived data
10) Backing up and restoring databases
11) Contacting database vendor for technical support
12) Generating various reports by querying from database
as per need
www.company.com
CS201-DBMS Dept of CSE
Database Designers
• Database designers are responsible for identifying the
data to be stored in the database and for choosing
Topic 4
appropriate structures to represent and store this data.
• These tasks are mostly undertaken before the database
Database Designers
is actually implemented and populated with It is the
responsibility of database designers to communicate
with all prospective database users in order to
understand their requirements, and to come up with a
design that meets these requirements.
www.company.com
CS201-DBMS Dept of CSE
Database Designers
• In many cases, the designers are on the staff of the DBA
and may be assigned other staff responsibilities after the
Topic 4
database design is completed.
• Database designers typically interact with each potential
Database Designers
group of users and develop views of the database that
meet the data and processing requirements of these
groups.
www.company.com
CS201-DBMS Dept of CSE
End Users
• End users are the people whose jobs require access to
the database for querying, updating, and generating
Topic 4
reports; the database primarily exists for their use.
• There are several categories of end users:
End Users
• Casual end users
• Naive or parametric end users
• Sophisticated end users
• Stand-alone users
www.company.com
CS201-DBMS Dept of CSE
Casual end users
• Casual end users occasionally access the database,
Topic 4
but they may need different information each
time.
End Users
• They use a sophisticated database query language
to specify their requests and are typically middle-
or high-level managers or other occasional
browsers.
www.company.com
CS201-DBMS Dept of CSE
Naive or parametric end users
• Naive or parametric end users make up a sizable portion of
database end users.
Topic 4 • Their main job function is querying and updating the
database, using standard types of queries and updates-called
canned transactions-that have been carefully programmed
and tested.
End Users
• The tasks that such users perform varies:
• Bank tellers check account balances and post withdrawals
and deposits.
• Reservation clerks fur airlines, hotels, and car rental
companies check availability for a given request and make
reservations
www.company.com
CS201-DBMS Dept of CSE
Sophisticated end users
• Sophisticated end users include engineers, scientists, business
Topic 4 analysts, and others who thoroughly familiarize themselves with
the facilities of the DBMS so as to implement their applications to
meet their complex requirements.
End Users Stand-alone users:
• Stand-alone users maintain personal databases by using ready-
made program packages that provide easy-to-use menu-based or
graphics-based interfaces.
• An example is the user of a tax package that stores a variety of
personal financial data for tax purposes.
www.company.com
CS201-DBMS Dept of CSE