Download as pdf or txt
Download as pdf or txt
You are on page 1of 27

Module 1

Database systems concepts and architecture

Dheeba. J/SCOPE
Definition
• Data -> Raw, unprocessed facts that can be recorded or
stored.
• e.g Name, age, weight etc.,
• Database -> is a collection of related data
• e.g Library Management system, Online banking system
• Database Management System (DBMS) -> A software for
defining, constructing, manipulating, and sharing data
• e.g Oracle, MySQL, MongoDB etc.,
• Meta data -> database definition
Dheeba. J/SCOPE
Functionalities of DBMS
• defining, constructing, manipulating, and sharing data
• Define – specifying the data type, structure and constraints for the
data to be stored
• Construct – process of storing the data
• Manipulate – Querying the database to retrieve specific data,
updating the database and generating the reports
• Share – allows multiple users to access the database concurrently.

Dheeba. J/SCOPE
Applications of DBMS

Dheeba. J/SCOPE
File System Vs DBMS
• Consider the scenario: A company has a large collection of data on employees,
departments, products, sales, and so on. This data is accessed concurrently by several
employees. Questions about the data must be answered quickly, changes made to the
data by different users must be applied consistently, and access to certain parts of the
data (e.g., salaries) must be restricted.
• Drawbacks of file system
• Data redundancy and inconsistency
• Difficulty in accessing data
• Data isolation
• Integrity problems
• Atomicity problems
• Concurrent-access anomalies
• Security problems
Dheeba. J/SCOPE
Advantages of DBMS over File system
• Data redundancy - repetition of data
• The file system cannot control redundancy of data.
• Whereas, DBMS controls redundancy by maintaining a single repository of
data that is defined once and is accessed by many users.

• This will lead to wastage of storage space, inconsistency

Dheeba. J/SCOPE
Restricting Unauthorized Access
• When multiple users share a large database, it is likely that most users
will not be authorized to access all information in the database.
• For example, financial data such as salaries and bonuses is often
considered confidential, and only authorized persons are allowed
to access such data.
• type of access operation—retrieval or update—must also be
controlled.
• DBMS should provide a security and authorization subsystem, which
the DBA uses to create accounts and to specify account restrictions.
• For example, only the DBA’s staff may be allowed to use certain
privileged software, such as the software for creating new
accounts. Dheeba. J/SCOPE
• Providing Persistent Storage for Program Objects
• In a file system, the values of program variables or objects are discarded once
a program terminates
• When the need arises to read this data once more, the programmer must
convert from the file format to the program variable or object structure.
• DBMS software automatically performs any necessary conversions.
• Such an object is said to be persistent, since it survives the termination of
program execution and can later be directly retrieved by another program.

Dheeba. J/SCOPE
• Providing Storage Structures and Search Techniques for Efficient
Query Processing
• Database systems must provide capabilities for efficiently executing queries
and updates.
• Because the database is typically stored on disk, the DBMS must provide
specialized data structures (indexes) and search techniques to speed up disk
search for the desired records.
• In order to process the database records needed by a particular query, those
records must be copied from disk to main memory.
• Therefore, the DBMS often has a buffering or caching module that maintains
parts of the database in main memory buffers
• The query processing and optimization module of the DBMS is responsible
for choosing an efficient query execution plan for each query based on the
existing storage structures.
Dheeba. J/SCOPE
• Providing Backup and Recovery
• The backup and recovery subsystem of the DBMS is responsible for recovery.
• For example, if the computer system fails in the middle of a complex update
transaction, the recovery subsystem is responsible for making sure that the
database is restored to the state it was in before the transaction started
executing.
• Providing Multiple User Interfaces
• Multiple users -> different levels of technical knowledge -> so DBMS should
provide a variety of user interfaces.
• e.g Query languages -> casual users, programming language interfaces ->
application programmers, forms -> parametric users, menu driven interface ->
standalone users

Dheeba. J/SCOPE
• Representing Complex Relationships among Data
• A database may have variety of data -> interrelated in many ways.
• DBMS must be capable of:
• Representing complex relationships among data
• Retrieve and update related data easily and efficiently
• Enforcing Integrity Constraints
• Specifying a data type for the data (Simplest constraint)
• Uniqueness of the data items
• Responsibility of the database designers to fix these constraints

Dheeba. J/SCOPE
Simple database system environment

Dheeba. J/SCOPE
Example

Define
Construct
Manipulate
share
Dheeba. J/SCOPE
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.

Dheeba. J/SCOPE
• Example of a catalog

Dheeba. J/SCOPE
• Insulation between Programs and Data, and Data Abstraction
• Called program-data independence.
• Allows changing data structures and storage organization without having to
change the DBMS access programs
• A data model is used to hide storage details and present the users with a
conceptual view of the database.

Internal storage format for the student record

Dheeba. J/SCOPE
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.

Sharing of data and multi-user transaction processing:

• Allowing a set of concurrent users to retrieve from and to update the database.
• Concurrency control within the DBMS guarantees that each transaction is
correctly executed or aborted.
• Recovery subsystem ensures each completed transaction has its effect
permanently recorded in the database.
• OLTP (Online Transaction Processing) is a major part of database applications.
This allows hundreds of concurrent transactions to execute per second.
Dheeba. J/SCOPE
Database Users
• Based on the interaction with the database, DBMS has two category
of users
Actors on the scene - People Workers behind the scene - design,
whose jobs involve use of a large development, and operation of the
database everyday. DBMS software and system environment.
There are 4 different users, There are 3 different users,
• Database Administrators • DBMS system designers and
• Database Designers implementers
• End Users • Tool developers
• System Analysts and • Operators and maintenance
Application Programmers personnel
(Software Engineers)
Dheeba. J/SCOPE
Actors on the scene
• Database Administrators
• In database environment, primary resources -> Database, Secondary
resource -> DBMS and related software.
• DBA responsibilities,
• Administering the primary/secondary resources
• Authorizing access to the database
• Coordinating and Monitoring use of database
• Acquiring software and hardware resources
• Handling any security related threats

Dheeba. J/SCOPE
• Database Designers
• Responsible for,
• Identifying the data to be stored in the database
• Choose appropriate content, structure, the constraints, and functions or
transactions against the database.
• Communicate with the end-users and understand their needs
• End-users
• They use the data for queries, reports and some of them update the database content.
End-users can be categorized into:
• Casual: access database occasionally when needed
• Naïve or Parametric: they make up a large section of the end-user population.
• They use previously well-defined functions in the form of “canned transactions”
against the database.
• Examples, The person who is working in the bank will basically tell us the
account balance and post-withdrawal and deposits.
• Reservation clerks for airlines, railway, hotels, and car rental companies
basically check availability forDheeba.
a given
J/SCOPE request and make the reservation.
• Sophisticated end users
• These users basically include engineers, scientist, business
analytics and others who thoroughly familiarize themselves with
the facilities of the DBMS in order to implement their application
to meet their complex requirement.
• These users try to learn most of the DBMS facilities in order to
achieve their complex requirements.
• Many use tools in the form of software packages that work closely
with the stored database.
• Stand-alone
• Mostly maintain personal databases using ready-to-use packaged
applications.
• e.g., tax program user that creates its own internal database.
• User who maintains an address book
Dheeba. J/SCOPE
• System Analysts and Application Programmers (Software
Engineers)
• System analysts -> determines the requirements of the
end users -> develop specifications for canned
transactions.
• Application Programmers -> test, debug and document
these canned transactions.

Dheeba. J/SCOPE
Workers behind the scene
• DBMS system designers and implementers design and
implement the DBMS modules and interfaces as a software
package.
• Tool developers design and implement tools—the software
packages.
• 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.
Dheeba. J/SCOPE
Review Questions
• Give some examples of integrity constraints that can apply to the
database.
2.
1.

• The StudentNumber should be unique for each STUDENT record (key


constraint).
• The value of Grade in a GRADE REPORT _ record must be one of the
values in the set (A, B, C, D, E, F, S, N} (domain constraint).
Dheeba. J/SCOPE
• Mention some situations in which it may make sense to use traditional
file processing instead of a database approach.

• Sometimes DBMS involves unnecessary costs due to the high initial


investment in hardware, software, training, security, control etc.
• So, if you are working with simple and well-defined database
applications that aren't going to change at all.
• Sometimes, DBMS won't fit if you have embedded systems with
limited storage capacity, so it is better to use traditional file
processing.
• When you have sensitive data that you don't want to give multiple
user access to.
• Examples of such system
• Small single user application that does not require security (such as a customized calculator
or a personal address and phone book)
• Real‐time navigation system (with heavy computation and very little data)
Dheeba. J/SCOPE
A database that stores student and course
information

Dheeba. J/SCOPE
• If the name of the 'CS' [Computer Science] Department changes to
'CSSE' [Computer Science and Software Engineering] Department and
the corresponding prefix for the course number also changes, identify
the columns in the database that would need to be updated.

• The following columns has to be updated

Dheeba. J/SCOPE

You might also like