CS 4002 Unit - 1 - Part A
CS 4002 Unit - 1 - Part A
Unit 1 – Part a
Table of Contents
1) INTRODUCTION................................................................................................................................................... 2
• Database ............................................................................................................................................................... 2
o Implicit Properties of Database ..................................................................................................................... 2
• DataBase Management System (DBMS)........................................................................................................... 2
• A simplified database system environment....................................................................................................... 3
• Applications of Database .................................................................................................................................... 3
2) COMPONENTS OF DBMS ................................................................................................................................... 3
• Hardware ............................................................................................................................................................. 3
• Software ............................................................................................................................................................... 3
• Data ...................................................................................................................................................................... 3
• Procedures ........................................................................................................................................................... 4
• Database Access Language ................................................................................................................................. 4
• Database Users .................................................................................................................................................... 4
o Database Administrator ................................................................................................................................. 4
o Database Designers ......................................................................................................................................... 4
o Native or parametric End Users .................................................................................................................... 4
o Sophisticated Users ......................................................................................................................................... 4
3) ADVANTAGE OF DBMS ...................................................................................................................................... 4
• Controlling Redundancy: ................................................................................................................................... 4
• Data independence: ............................................................................................................................................. 5
• Efficient Data Access: ......................................................................................................................................... 5
• Representing Complex Relationship among Data: .......................................................................................... 5
• Data Integrity & Security: .................................................................................................................................. 5
• Data administration: ........................................................................................................................................... 5
• Concurrent access: .............................................................................................................................................. 5
• Backup & Crash Recovery: ................................................................................................................................ 5
• Reduced application development time: ........................................................................................................... 5
4) CHARACTERISTICS OF DATABASE APPROACH ....................................................................................... 6
o Self-Describing Nature of a Database System .............................................................................................. 6
o Insulation between Programs and Data, and Data Abstraction ................................................................. 6
o Support of Multiple Views of the Data .......................................................................................................... 6
o Sharing of Data and Multiuser Transaction Processing.............................................................................. 6
5) DATABASE SYSTEM v/s FILE SYSTEM .......................................................................................................... 6
• Data redundancy and inconsistency: ................................................................................................................. 6
• Difficulty in accessing data: ................................................................................................................................ 6
• Data Isolation: ..................................................................................................................................................... 6
Page 1
CS 4002 Unit 1- Part a
----------------------------------------------------------------------------------------------------------------
1) INTRODUCTION
• Database
o The collection of data, usually referred to as the database, contains information
relevant to an enterprise.
or
o A database is a collection of related data. By data, we mean known facts that can
be recorded and that have implicit meaning.
o Ex:- Consider the names, telephone numbers, and addresses of the people you
know.
▪ Nowadays, this data is typically stored in mobile phones, which have their
own simple database software.
▪ This collection of related data with an implicit meaning is a database.
o Implicit Properties of Database
▪ A database represents some aspect of the real world, sometimes called the
miniworld or the universe of discourse (UoD).
Changes to the miniworld are reflected in the database.
▪ A database is a logically coherent collection of data with some inherent
meaning. A random assortment of data cannot correctly be referred to as a
database.
▪ A database is designed, built, and populated with data for a specific
purpose. It has an intended group of users.
• DataBase Management System (DBMS)
o DBMS is a collection of interrelated data & set of programs to access those data.
or
o A DBMS is a computerized system that enables users to create and maintain a
database.
o It is a general-purpose software that facilitates the processes of defining,
constructing, manipulating, & sharing databases among various users &
applications.
o Database systems are designed to manage large bodies of information.
Management involves - defining structures & manipulation of information.
o In addition, the database system must ensure the safety of the information stored.
Page 2
CS 4002 Unit 1- Part a
• Applications of Database
Enterprise Information Banking and Finance Web-based services
Accounting Banking Social-media
Human resources Credit card transactions Online retailers
Universities Finance Online advertisements
2) COMPONENTS OF DBMS
• Hardware
o The hardware is the actual computer system
used for keeping & accessing the database.
o The conventional DBMS hardware consists
of secondary storage devices such as hard
disks.
• Software
o It is the actual DBMS between the physical
database & the users of the system.
o All the requests from the user for accessing
the database are handled by DBMS.
• Data
o The main task of DBMS is to process the data.
o Databases are used to store, retrieve, & update date to and from the databases.
Page 3
CS 4002 Unit 1- Part a
• Procedures
o These are general instructions to setup and install a DBMS, to login and logout
of DBMS software, to manage databases, to take backups, generating reports etc.
• Database Access Language
o It is a simple language designed to write commands to access, insert, update,
and delete data stored in any database.
o User can create new databases, tables, insert data, fetch stored data, update data,
and delete the data using the access language.
• Database Users
There are several users who can access or retrieve the data on demand using the
application and the interfaces provided by the DBMS.
o Database Administrator
▪ In a database environment, the primary resource is the database itself, and
the secondary resource is the DBMS and related software. Administering
these resources is the responsibility of the database administrator (DBA).
▪ The DBA is responsible for authorizing access to the database,
coordinating and monitoring its use, and acquiring software and hardware
resources as needed, security breaches and poor system response time.
o Database Designers
▪ They are responsible for identifying the data to be stored in the database
and for choosing appropriate structures to represent and store this data.
▪ They interact with each potential group of users & develop views of the
database that meet the data & processing requirements of these groups.
o Native or parametric End Users
▪ Unsophisticated users who don’t have any DBMS knowledge, but
frequently use database applications in daily life to get the desired results.
▪ Ex:- Railway’s ticket booking users, clerks in any bank because they don’t
have any DBMS knowledge, but still use the database for various task.
o Sophisticated Users
▪ Include engineers, scientists, business analysts, and others who thoroughly
familiarize themselves with the facilities of the DBMS in order to
implement their own applications to meet their complex requirements.
3) ADVANTAGE OF DBMS
• Controlling Redundancy:
File Processing System DBMS
o In traditional software development o In the this approach, the views of
utilizing file processing, every user different user groups are integrated
group maintains its own files for during database design. Ideally, we
handling its data-processing. should have a database design that
o This redundancy in storing the stores each logical data item—such
same data multiple times leads to as a student’s name or birth date—
Page 4
CS 4002 Unit 1- Part a
Page 5
CS 4002 Unit 1- Part a
o Many important tasks are handled by the DBMS instead of being implemented
by the application.
Page 6
CS 4002 Unit 1- Part a
• Integrity Problems:
o The data values stored in the database must satisfy certain types of consistency
constraints. (Ex:-balance of bank account cant be less than zero)
o Developers enforce these constraints in the system by adding appropriate code in
the various application programs. However, when new constraints are added, it
is difficult to change the programs to enforce them.
• Atomicity Problems:
o In many applications, it is crucial that, if a failure occurs, the data be restored to
the consistent state that existed prior to the failure.
o Ex:- Consider a banking system with a program to transfer $500 from account A
to account B.
o If a system failure occurs during the execution of the program, it is possible that
the $500 was removed from the balance of account A but was not credited to the
balance of account B, resulting in an inconsistent database state
o It is essential to database consistency that either both the credit & debit occur, or
that neither occur.
i.e. the funds transfer must be atomic—it must happen in its entirety or not at all.
o It is difficult to ensure atomicity in a conventional file-processing system.
• Concurrent Access Anomalies:
o Many systems allow multiple users to update the data simultaneously.
o In such an environment, interaction of concurrent updates is possible & may
result in inconsistent data.
o Ex:- Consider account A, with a balance of $10,000.
If two bank clerks debit the account balance (by say $500 & $100, respectively)
of account A at almost exactly the same time, the result of the concurrent
executions may leave the account balance in an incorrect (or inconsistent) state.
Suppose that the programs executing on behalf of each withdrawal read the old
balance, reduce that value by the amount being withdrawn, & write the result
back. If the two programs run concurrently, they may both read the value
$10,000, & write back $9500 & $9900, respectively.
• Security Problems:
o Not every user of the database system should be able to access all the data.
o Ex:- In a university, payroll personnel need to see only that part of the database
that has financial information. They do not need access to information about
academic records.
o But since application programs are added to the file-processing system in an ad-
hoc manner, enforcing such security constraints is difficult.
Page 7