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

Database Systems Lecture 2

Uploaded by

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

Database Systems Lecture 2

Uploaded by

rajiwulo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

CSC 271-Database Systems

Lecture # 2

Asma Khalid Butt


[email protected]
What is Data?
◎ Data are characteristics or attributes, often numerical, collected through
observation and can be qualitative(descriptive) or quantitative(numerical).
Any facts and figures about an entity is called as Data.

◎ Data serves a crucial role in various sectors by facilitating analysis,


supporting decision-making processes, and being fundamental to research
activities.
What is Database?

◎ 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

◎ Traditional file processing system or simple file processing system


refers to the first computer-based approach of handling the
commercial or business applications.

◎ That is why it is also called a replacement of the manual file system.


Before the use of computers, the data in the offices or business was
maintained in the files.
Databases and Traditional File
Processing System

◎ It was laborious, time consuming, inefficient, especially in case of


large organizations.

◎ File processing environment simply transformed manual file work to


computers. So, processing became very fast and efficient, but as file
processing systems were used, their problems were also realized.
Traditional File Processing Environment
Drawbacks of different File Processing System

◎ Non-Sharing: Major drawback in the traditional file system environment is


the non-sharing of data.

◎ Redundancy: It means if different systems of an organization are using some


common data then rather than storing it once and sharing it, each system
stores data in separate files. This creates the problem of redundancy or
wastage of storage.

◎ Inconsistency: The change in the data in one system sometimes is not


reflected in the same data stored in other system. So different systems in
organization; store different facts about same thing.
Drawbacks of different 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

◎ Four types of DB users:


o Naive users/Native users/End users
o Application programmers
o Sophisticated users
o Specialized users
Types of Database Users
◎ Naive Users/Native Users/End Users: They are the unsophisticated users
who use the existing application to interact with the database.
o Example: People accessing database over the web, bank tellers, clerical
staffs, etc.
◎ Application Programmers: They are the computer professionals who write
the application programs. They interact with system through DML queries.
○ For example: Writing a C program to generate the report of employees
who are working in particular department, will involve a query to fetch
the data from database. It will include a embedded SQL query in the C
Program.
Types of Database Users…
◎ Sophisticated Users: They interact with the system by writing SQL queries
directly through the query processor (like SQL) without writing application
programs.
o Example: Analysts, who submits SQL queries to explore data in the DBMS.
◎ Specialized Users: They are also sophisticated users who write specialized
database applications that do not fit into the traditional data processing
framework. They are the developers who develop the complex programs to
the requirement.
○ Example: Developers creating Computer-Aided Design (CAD) systems, expert
systems, or knowledge-based systems that handle complex data like graphics and
audio.
Database Administrators (DBAs)
◎ DBA is a person or group that is responsible for supervising both the
database and the use of the DBMS.
◎ Database Administrators (DBAs) coordinate all the activities of the database
system.
◎ They use specialized software to store and organize data
◎ They have all the permissions
DBAs Tasks
◎ Schema definition
◎ Storage structure and access method definition
◎ Schema and physical organization modification
◎ Specifying integrity constraints
◎ Granting user authority to access database
◎ Monitoring performance
◎ Routine Maintenance
◎ Acting as liaison with users
◎ Backing up and restoring databases
History of Database Systems
◎ Manual System – 1950s:
o Data was stored as paper records
o Huge man power involved
o Unnecessary time was wasted like searching for a particular record
o This was inefficient
◎ 1950s and early 1960s:
o Data processing using magnetic tapes for storage
 Tapes provided only sequential access
o Punched cards for input
History of Database Systems..
◎ 1960s and 1970s:
o Hard disks allowed direct access to data
o 1968: Data stored in files known as File Based Systems

◎ 1966 : IMS Information Management System, IBM, Hierarchical


◎ 1971: DBTG- Data Base Task Group
CODASYL: Conference on Data System Language by Charles Bachman
its first trial = IDS (Integrated Data Store)
IDMS (Information Data Management System)
Network Model, popular
History of Database Systems..
◎ 1973: INGERS, wide spread till 1979 , QUEL, University of California, Engene Wong
and Michael Stone Braker, Relational
◎ 1974: IBM System R, Relational
◎ 1976: Peter Chen give Entity – Relational Model
◎ 1978: Oracle version 1 by Larry Ellision
◎ 1979: SQL/DS (DB2) by IBM/ Oracle V2
◎ 1980: Lotus 1-2-3 spreadsheet by Lotus S/W, dBase by C. Wayne Ratlift
◎ 1990: OBJECT- ORIENTED approach, Object relational Mapping System (ORMs)
◎ 2000: XML, NoSQL, NewSQL
DBMS Architecture
◎ The design of a DBMS depends on its architecture.
◎ DBMS architecture helps in design, development, implementation, and
maintenance of a database.
◎ A database stores critical information for a business. Selecting the correct
Database Architecture helps in quick and secure access to this data.
◎ DBMS architecture depends upon
o the underlying computer system on which database system runs
o how users are connected to the database to get their request done
Client/Server Architecture?
◎ The basic client/server architecture is used to deal with a large number of PCs,
web servers, database servers and other components that are connected with
networks.
◎ The client/server architecture consists of many PCs and a workstation which
are connected via the network. Client request the server for a service. Server
provides the requested service to the client.
Types of DBMS Architecture
◎ DBMS architecture can be seen single tire or multi-tier
Single or 1-Tier Architecture
◎ In single or 1 tier architecture, the database is directly available to
the user. The Client, Server, and Database all reside on the same
machine i.e. the user can directly sit on the DBMS and uses it.
◎ Any changes done here will directly be done on the database itself. It
doesn't provide a handy tool for end users.
◎ No network connection is required to perform the action on the
database
◎ Usage Scenarios:
o Ideal when the data doesn't change often.
o Best when only one user is accessing the database.
o For development of the local application, where programmers can
directly communicate with the database for the quick response.
o But such architecture is rarely used in production.
2-Tier Architecture

◎ 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

◎ The 3-Tier architecture contains another layer of Application Server between


the client & server. In this architecture, client can't directly communicate with
the server.
◎ The application on the client-end interacts with an application server which
further communicates with the database system and then the query processing
and transaction management takes place.
◎ This intermediate layer of Application Server acts as a medium for exchange of
partially processed data between server and client.
◎ End user has no idea about the existence of the database beyond the application
server. The database also has no idea about any other user beyond the
application.
3-Tier Architecture..

◎ In 3-tier architecture, an application virtually split into three separate logical layers
3-Tier Architecture..

◎ The 3-Tier architecture is used in large web applications


◎ It is the most popular DBMS architecture.
◎ Advantages:
o Enhanced scalability due to distributed deployment of application servers. Now,
individual connections need not be made between client and server.
o Data Integrity is maintained. Since there is a middle layer between client and
server, data corruption can be avoided/removed.
o Security is improved. This type of model prevents direct interaction of the client
with the server thereby reducing access to unauthorized data.
◎ Disadvantages:
o Increased complexity of implementation and communication. It becomes difficult
for this sort of interaction to take place due to presence of middle layers.
Thank You

You might also like