Database Systems Lecture 2
Database Systems Lecture 2
Lecture # 2
◎ Definition:
“A shared collection of logically related data, and a
description of this data, designed to meet the
information needs of the organization.”
What is DBMS?
◎ The DBMS is a general purpose software system
that facilitates the process of defining,
constructing, manipulating, and sharing
databases among various users and applications
Databases and Traditional File
Processing System
◎ Program-data interdependence:
o We need changes in the system, but due to program-data
interdependence these changes in the systems were very hard to make.
o A change in one will affect the other whether related or not.
o For example, suppose data about the customer bills is stored in the file,
and different programs use this file for different purposes, like adding
data into the bills file, to compute the bill and to print the bill.
o Now the company asks to add the customers’ address in the bills, for this
we have to change the structure of the bill file and also the program that
prints the bill.
Advantages of DBMSs
Advantages of DBMSs
◎ Control of data redundancy
o Reduces unnecessary data duplication.
◎ Data consistency
o Ensures that data remains uniform and accurate.
◎ More information from the same amount of data
o Enables better data analysis and insights
◎ Sharing of data
o Data is shared by all authorized users
Advantages of DBMSs..
◎ Improved data integrity
o Integrity in terms of constraints, maintains the accuracy and
reliability of data.
◎ Improved security
o Protects data from unauthorized access, access rights
◎ Enforcement of standards
o Data formats, naming conventions, documentation etc.
◎ Economy of scale
o Cost savings due to database approach
Advantages of DBMSs..
◎ Improved data accessibility/ responsiveness
o Ad hoc queries on integrated data, quick retrieval and efficient data
access.
◎ Increased productivity
o Developer need to focus on application
◎ Improved maintenance
o Through program data independence
o DBMS allows you to change the data structure without changing the
applications that use it.
Advantages of DBMSs..
◎ Increased concurrency
o Multiple users are allowed to access same data
◎ Improved backup and recovery services
o Backup routines, recovery procedures by skilled staff
Disadvantages of DBMSs
◎ Complexity: DBMS systems are complicated to design and manage.
◎ Size: They require substantial storage and memory.
◎ Cost of DBMS: Can be expensive to purchase and maintain.
◎ Additional hardware costs: May need extra hardware to run efficiently.
◎ Cost of conversion: Converting to a DBMS can be costly and time-consuming.
◎ Performance: General-purpose DBMS may run slower than specific file-
based systems.
◎ Higher impact of a failure: A DBMS failure can disrupt the entire
organization.
Components of the DBMS Environment
The database management system (DBMS) consist of several components.
The major components of DBMS are shown in the following Figure.
Components of the DBMS Environment..
1. Hardware
The physical devices that are needed to run a DBMS. This includes
servers, computers, storage devices, network devices, etc.
o Servers: Powerful computers that store the database and run the DBMS
software.
o Storage Devices: Hard drives or SSDs where the database files are physically
stored.
o Client Machines: User computers that access the database to perform various
operations.
Components of the DBMS Environment..
2. Software
Software includes the DBMS software itself, application programs, and
the operating system.
○ DBMS Software: Examples include MySQL, Oracle, Microsoft SQL
Server, PostgreSQL.
o Application Programs: These are programs that use the DBMS to
perform tasks, often written in languages like Java or C++.
Components of the DBMS Environment..
3. Data
The actual information stored in the database
○ Student Records: Information about students in a university, including
their names, IDs, grades, and courses.
○ E-commerce Data: Information about products, customers, orders, and
payments in an online shopping website.
Components of the DBMS Environment..
4. Procedures
The instructions and rules that govern the design, implementation, and
use of the database. These are methods for handling and managing the
database effectively.
o Backup Procedures: Regular processes for backing up the database to
prevent data loss.
o Access Procedures: Steps to control who can access the database and
what operations they can perform.
o Recovery Procedures: Steps to restore the database to a correct state
after a failure.
Components of the DBMS Environment..
5. People
○ Discussed in next section
Database Users and Database
Administrators
◎ People who work with a database can be
o Database Users
o Database Administrators (DBAs)
Database Users
◎ Database users are the persons who interact with the database and take the
benefits of database
◎ Users are differentiated by the way they expect to interact with the database
◎ It is same a client-server
◎ In the 2-tier architecture, applications on the client end can directly
communicate with the database at the server side.
◎ An Application Programming Interfaces (APIs) like ODBC & JDBC
are used by client side program to call the DBMS
◎ The user interfaces and application programs are run on the client-side
◎ To communicate with the DBMS, client-side application establishes a
connection with the server side
◎ The server side is responsible to provide the functionalities like; query
processing and transaction management.
2-Tier Architecture..
◎ The 2-tier architecture is used inside any organization, where multiple clients
accessing the database server directly
◎ Example: Railway reservation from counter, where clerk as a client accesses the
railway server directly.
◎ Advantage:
o Direct and faster communication
o Maintenance and understanding is easier
o Compatible with existing systems
◎ Disadvantage:
o Scalability i.e. It gives poor performance when there are a large number of users
o Less secure as client can access the server directly
3-tier Architecture
◎ In 3-tier architecture, an application virtually split into three separate logical layers
3-Tier Architecture..