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

Lecture 2- Filebased vs Dbms

The document discusses the differences between database management systems (DBMS) and file-based systems, highlighting the advantages and disadvantages of each. It outlines basic database concepts, including data types, metadata, and the components of a DBMS, as well as the roles of various personnel involved in database management. Additionally, it addresses the costs and risks associated with adopting a database approach, emphasizing the importance of data integrity, security, and efficient data management.

Uploaded by

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

Lecture 2- Filebased vs Dbms

The document discusses the differences between database management systems (DBMS) and file-based systems, highlighting the advantages and disadvantages of each. It outlines basic database concepts, including data types, metadata, and the components of a DBMS, as well as the roles of various personnel involved in database management. Additionally, it addresses the costs and risks associated with adopting a database approach, emphasizing the importance of data integrity, security, and efficient data management.

Uploaded by

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

Database approach vs file-based system,

Advantages and dis-advantages of database Lecture 2


management system, components of DBMS
environment PREPARED BY:LECTURER
RABBIA BASHARAT
Course Learning
Objectives
Course Material
Course Contents
Assessments
 3 x Quizzes 10%
 3 x Assignments 10%
 Mid Term Exam 30%
 Final Exam 50%
 Lab Project 30%
BASIC DATABASE
CONCEPTS
Database
o An organized collection of logically related data
o A shared collection of logically related data, designed to meet the
information needs of multiple users in an organization
o A database models a particular real world system in the computer in
the form of data
o A database may be of any size and complexity e.g. a salesperson
may maintain a small database of customer contacts while a
large corporation may build a large database consisting of
several terabytes of data
BASIC DATABASE
CONCEPTS
Management Marketing

Sales Developme
Planning Control Corporat nt
e
Databas
e

Accounting

Accounts Accounts Payable


Receivable
BASIC DATABASE
CONCEPTS
BASIC DATABASE
CONCEPTS
Data
o A stored representation of objects and events that have meaning and
importance in the user’s environment
o For example, in a salesperson’s database, the data would include
facts such as customer name, address, and telephone number
o There are main two type of data
Raw facts
1. Structured Data: and
 This type of data has a pre-defined and figures
organized format
 For example,
Structured name,
data areaddress,
stored and telephone
in tabular form (in tables,
number
relations, arrays, spreadsheets, etc.)
 This type of data are most commonly found in traditional
databases
BASIC DATABASE
CONCEPTS
2. Unstructured Data:
 This type of data does not have a pre-defined format or
organization
 For example, documents, e-mails, maps, photographic images,
sound, and video
 Modern databases can combine both structured and
unstructured data to create a true multimedia environment
o For an organization data is an important resource
o For an organization to make proper decisions at proper time it is
only the data which can provide correct information and in-turn
cause good utilization of other organizational resources
BASIC DATABASE
CONCEPTS
Data VS Information
o The terms data and information are closely related, and in fact are
often used interchangeably
o Data refers to raw, unprocessed facts, figures, or symbols that are
collected or recorded
o It can be in the form of numbers, text, images, videos, or any other
format
o For example, a set of average temperatures recorded monthly is data
o On the other hand, information is the data that have been
processed in such a way as to increase the knowledge of the
person who uses the data
o It is the result of analyzing and interpreting data
o Information can help in making decisions or understanding a specific
topic
BASIC DATABASE
oCONCEPTS
For example, if you analyze the temperature data and find that
there is a steady decrease/decrease in temperature over
a period of time, that would be considered as information

Data

Informati
on
BASIC DATABASE
CONCEPTS
Metadata
o Data that describe the properties or characteristics of end-user
data and the context of those data Or simply it’s data about data
o It includes details such as the format, size, location, and creation
date of a file or dataset
o Metadata can be used to organize and categorize information,
making it easier to search for and analyze
o Examples of metadata include the author and title of a document,
the length and genre of a video, or the date and location a
photograph was taken
o Metadata is typically stored alongside the actual data and can be
accessed and processed by computers to perform various tasks
BASIC DATABASE
oCONCEPTS
Metadata enable database designers and users to understand what
data exist, what the data mean, and how to distinguish
between data items that at first glance look similar
BASIC DATABASE
CONCEPTS
File Processing System
o When computer-based data processing was first
available, there were no databases
and file-based systems were used
o A transitional file processing system, sometimes referred
to asa file-based system, stores data in separate files
o Each file contains a collection of records, and each record is typically
composed of fields or attributes that store specific data
values
o In this system, data is stored and managed on a file-by-file basis
o Updates or modifications to the data require changes to be made
directly to the individual files
BASIC DATABASE
CONCEPTS
Library Examinatio
n
Registratio
n

Library Examinati Registratio


Applicatio on n
ns Applicatio Applicatio
ns ns

Library Examinati Registratio


Data on Data n Data
Files Files Files

Traditional File Processing


System
BASIC DATABASE
CONCEPTS
Disadvantages of File Processing System
1. Program-data Dependence
 Since each application has its own set of files, any change in the
structure or format of data requires modifying all
applications that use that particular file. This makes the
system rigid and inflexible.
2. Duplication Of Data (Data Redundancy)
 Each file in the file processing system is independent of others,
which can lead to duplicate data and data inconsistency.
It also makes it difficult to retrieve and integrate data
from multiple files.
3. Įimited Data Sharing
 With the traditional file processing approach, each application
has its own private files, and users have little opportunity
to share data outside their own applications.
BASIC DATABASE
4.CONCEPTS
Įengthy Development Times
 With traditional file processing systems, each new application
requires that the developer essentially start from scratch by
designing new file formats and descriptions and then
writing the file access logic for each new program.
5. Excessive Program Maintenance
 The preceding factors all combined to create a heavy
program maintenance load in organizations that relied
on traditional file processing systems. In fact, as much as
80 percent of the total information system’s development
budget might be devoted to program maintenance in such
organizations.
BASIC DATABASE
CONCEPTS
OTHER DISADVANTAGES
 Lack of data security
 Data inconsistency
 Difficulty in data retrieval
 Limited concurrency control
 Difficulty in data backup and recovery
 Lack of scalability

It is important to note that many of the disadvantages of


file processing can also be the limitations of databases
if an organization does not properly apply the database
approach
Definition of Database
management system
A(DBMS)
Database Management System (DBMS) is software
designed to store, retrieve, define, and manage data in
a database.
DBMS examples include:
MySQL
SQL Server
Oracle
dBASE
FoxPro
Database
languages:
Data Definition Language (DDL)
DDL is used for specifying the database schema. It is used
for creating tables, schema, indexes, constraints etc. in
database. Lets see the operations that we can perform on
database using DDL:
2.Data Manipulation Language (DML)
DML is used for accessing and manipulating data in a
database. The following operations on database comes
under DML:Data Manipulation Language.
3.Data Control language (DCL)
DCL is used for granting and revoking user access on a
database
4.Transaction Control Language(TCL)
The changes in the database that we made using DML
commands are either performed or rollbacked using TCL.
Difference Between
File System and DBMS
File System DBMS
Structure Structure
The file system is a way of DBMS is software for managing
arranging the files in a storage the database.
medium within a computer.
Data Redundancy Data Redundancy
Redundant data can be present in In DBMS there is no redundant
a file system. data.
Backup and Recovery
It doesn’t provide Inbuilt
mechanism for backup and Backup and Recovery
recovery of data if it is lost. It provides in house tools for
Query processing backup and recovery of data even
There is no efficient query if it is lost.
processing in the file system. Query processing
Efficient query processing is there
in DBMS.
.
THE DATABASE
APPROACH
The Database Approach
o Database system stores data in a centralized and structured
manner using a database management system (DBMS)
o A database is a collection of related data organized in tables, with
each table consisting of rows and columns (relational database)
o A DBMS provides tools and functionalities to create, update, and
retrieve data, ensuring data integrity and providing data security
o A database system supports the use of structured query language
(SQL) for querying and manipulating data
THE DATABASE
APPROACH
Library
Examination
Registrati
on

Library Examinati Registratio


Applicatio on n
n Applicatio Applicatio
n n

DBMS

University
Students
Database
Database
Approach
THE DATABASE
APPROACH
Advantages of Database Approach
1. Program-data Independence
 With database approach data and its is
structure/description database where as application stored in
programs manipulating this separately, the change in the
one does not unnecessarily effect other. data are
2. Planned
 Good Data Redundancy
database design attempts to integrate previouslystored
separate (and
redundant) data files into a single, logical structure. Ideally, each
primary fact is recorded in only one place in the database files. The
database approach does not eliminate redundancy entirely but tries
to keep it minimum.
3. Improved Data Consistency
 By eliminating or controlling data redundancy, we greatly reduce the
opportunities for inconsistency because each data item stores in a
single place.
THE DATABASE
4.APPROACH
Increased Productivity Of Application Development
 A major advantage of the database approach is that it greatly
reduces the cost and time for developing new business applications.
The application required for the database my already exists and
need little modification. DBMS also provides a number of highly
productivity tools such as report generators, support for high-level
languages, etc.
5. Reduced Program Maintenance
 In a database environment, data are more independent of the
application programs that use them. Within limits, we can change
either the data or the application programs that use the data without
changing the other factor.
6. Improved Data Sharing
 A database is designed as a shared corporate resource. Authorized
internal and external users are granted permission to use the
database, and each user (or group of users) is provided one or more
user views into the database to facilitate this use.
THE DATABASE
7.APPROACH
Enforcement of Standard
 Proper database development process ensures that the
established guidelines, rules, and conventions are followed
while designing, developing, and maintaining databases. It
involves
and implementing
techniquesmeasures, procedures, integrity, and
consistency,
to quality in the
maintain database
system.
 Database approach enhances the accuracy, consistency,
8. Improved Data Quality
completeness, and reliability of the data stored in a
database. It involves implementing strategies, methods,
and techniques to eliminate errors, inconsistencies,
redundancies, and inaccuracies in the data, ensuring that it is
reliable and can effectively support business operations and
decision-making processes.
THE DATABASE
9.APPROACH
Better Backup and Recovery Facility
 Data is a very important resource and is very much
valuable for any organization. Database systems offer
excellent facilities for taking backup of data and good
mechanism of restoring those backups to get back the
backed-up data.
10.Better Concurrency Control
 Concurrency means the access of database form as number
of points simultaneously. Database systems offers
various mechanisms to access the data in such a way
that all the data accesses are completed correctly and
transparently. Its has proper protocol (RR,RW,WR,WW)

But Its not always just the SUGAR…


There is some Cost Involved in adopting Database
THE DATABASE
APPROACH
Cost and Risks of the Database Approach
1. New Specialized Personnel
 Organizations that use databases often need to hire or train
people who can design and implement databases, provide
administration services, and manage a team of new
employees. Due to the fast-paced advancements in
technology, these individuals will also require regular
retraining or upgrading.
2. Installation and Management Cost and Complexity
 You also need some specialized software in the form of
DBMS, some specialized hardware and some specialized
personnel as well.
THE DATABASE
3.APPROACH
Conversion Cost
 It required much efforts and costs from manual/file approach to
database approach
4. Need for Explicit Backup and Recovery
 A shared corporate database must be accurate and available at all
times. This requires that comprehensive procedures be developed
and used for providing backup copies of data and for restoring a
database when damage occurs. It’s a very technical task, need for
specialized staff.
5. Organizational Conflicts
 A shared database requires a consensus on data definitions and
ownership, as well as responsibilities for accurate data maintenance.
Experience has shown that conflicts on data definitions, data formats
and coding, rights to update shared data, and associated issues are
frequent and often difficult to resolve.
5TH Components of a
DBMS
1. Hardware
Supports DBMS and applications.
Can range from PCs to mainframes.
Includes storage, servers, and network devices.
2. Software
Includes DBMS software, OS, and applications.
Uses 3GL (C++, Java) & 4GL (SQL, report generators).
Provides tools for queries, forms, and data processing.

3. Data
Central component containing operational data & metadata.
Schema: Defines database structure (e.g., tables, attributes).
Example: PropertyForRent (propertyNo, rent, ownerNo).
4. Procedures
Rules & instructions for database management.
Includes system operations, backups, recovery, and security.
5. People
Includes DB administrators, developers, and end-users.
Responsible for design, maintenance, and usage.
Roles in the Database
Environment
InE this section, we examine what we listed in the previous
section as the fifth component of the DBMS environment: the
people. We can identify four distinct types of people who
participate in the DBMS environment:
data and database administrators,
 database designers,
application developers,
end-users.
Data Administrator
is(DA)
responsible for the management of the data
resource, including database planning; development
and maintenance of standards, policies and
procedures; and conceptual/logical database design.
The DA consults with and advises senior managers,
ensuring that the direction of database development
will ultimately support corporate objectives.
The Database
Administrator (DBA)
is responsible for the physical realization of the database,
including physical database design and implementation,
security and integrity control, maintenance of the operational
system, and ensuring satisfactory performance of the
applications for users
Database Designers
The logical database designer is concerned with
identifying the data (that is, the entities and attributes), the
relationships between the data, and the constraints on the
data that is to be stored in the database.

The physical database designer decides


how the logical database design is to be physically realized.
This involves: • mapping the logical database design into a
set of tables and integrity constraints; • selecting specific
storage structures and access methods for the data to
achieve good performance;
History of
database
Why Database
Systems?
 Your life is dramatically affected by database technology. You come into
contact with databases daily basis through activities such as withdrawing
cash using ATM, shopping at a supermarket, ordering book online and
registering for classes.
 The convenience of your life is partly due to proliferation of computerized
databases and supporting database technology.
 Database technology is not only improving the daily operations of
organization but also the quality of decision that affect our lives.
 Databases contain a flood of data about many aspects of our lives: consumer
preferences, telecommunications usage, credit history, television viewing
habits, and so on. Database technology helps to summarize this mass of data
into useful information for decision making.
 Management uses information gleaned from databases to make long-range
decisions such as investing in plants and equipment, locating stores, adding
new items to inventory, and entering new businesses.
Database Characteristics
 Database is a collection of persistent data that can be shared and interrelated.
 Persistent means that data reside on stable storage such as a magnetic disk.
For example, organizations need to retain data about customers, suppliers, and
inventory on stable storage because these data are repetitively used.
Persistency depends on relevance of intended usage.
 Shared means that a database can have multiple uses and users. A database
provides a common memory for multiple functions in an organization. For
example, a personnel database can support payroll calculations, performance
evaluations, government reporting requirements, and so on. Many users can
access a database at the same time. For example, many customers can
simultaneously make airline reservations.
 Interrelated means that data stored as separate units can be connected to
provide a whole picture. For example, a customer database relates customer
data (name, a d d r e s s , . . . ) to order data (order number, order d a t e , . . . )
to facilitate order processing.
Simple Database Example to Depict
Database Characteristics
Entity is a cluster of data usually about a single subject that can
be accessed together. An entity can denote a person, place, thing,
or event. For example, a personnel database contains entities
such as employees, departments, and skills as well as
relationships showing employee assignments to departments,
skills possessed by employees, and salary history of employees. A
typical business database may have hundreds of entities and
relationships.
Features of Database Management
Systems

A database management system (DBMS) is a collection of


components that supports the creation, use, and maintenance of
databases.
1. Database Definition
To define a database, the entities and relationships must be
specified. In most commercial DBMSs, tables store collections of
entities. A table has a heading row (first row) showing the column
names and a body (other rows) showing the contents of the table.
Relationships indicate connections among tables. For example,
the relationship connecting the student table to the enrollment
table shows the course offerings taken by each student.
Features of Database Management
Systems
2. Nonprocedural Access
The most important feature of a DBMS is the ability to answer
queries. A query is a request for data to answer a question. For
example, the user may want to know customers having large
balances or products with strong sales in a particular region.
Nonprocedural access allows users with limited computing skills
to submit queries. The user specifies the parts of a database to
retrieve, not implementation details of how retrieval occurs.
Implementation details involve coding complex procedures with
loops.
Nonprocedural languages do not have looping statements (for,
while, and so on) because only the parts of a database to retrieve
are specified.
Features of Database
Management Systems
3. Procedural Language Interface
 Procedural Language Interface is a method to combine a
nonprocedural language such as SQL with a programming
language.
 DBMSs provide the full capabilities of a programming language.
For example, Visual Basic for Applications (VBA) is a
programming language that is integrated with Microsoft Access.
VBA allows full customization of database access, form
processing, and report generation.
 Most commercial DBMSs have a procedural language interface
comparable to VBA. For example, Oracle has the language
PL/SQL and Microsoft SQL Server has the language Transact-SQL.
Features of Database
Management Systems
4. Transaction processing
 Transaction processing enables a DBMS to process large
volumes of repetitive work.
 A transaction is a unit of work that should be processed
reliably without interference from other users and without
loss of data due to failures. Examples of transactions are
withdrawing cash at an ATM, making an airline reservation,
and registering for a course.
 A DBMS ensures that transactions are free of interference
from other users, parts of a transaction are not lost due to a
failure, and transactions do not make the database
inconsistent.
Features of Database Management Systems

5. Database Tuning
 In addition to features provided directly by vendors of DBMSs, third-
party software is also available for many DBMSs.
 In most cases, third-party software extends the features available
with the database software. For example, many third-party vendors
provide advanced database design tools that extend the database
definition and tuning capabilities provided by DBMSs.

Entity Relationship Diagram (ERD) for University


Database
Summary of
Features of
DBMSs
Evolution of
Database
Technology
Current Market
for Database
Software

2003 market shares by revenue of


enterprise database software
DBMS Architecture 1-
level, 2-Level, 3-Level
Types of DBMS Architecture
There are several types of DBMS Architecture that
we use according to the usage requirements.
Types of DBMS Architecture are discussed here.
1-Tier Architecture

1. In this architecture, the database is directly available to the


user. It means the user can directly sit on the DBMS and
uses it.
2. Any changes done here will directly be done on the
database itself. It doesn't provide a handy tool for end
users.
3. The 1-Tier architecture is used for development of the local
application, where programmers can directly communicate
with the database for the quick response
2-Tier Architecture
3-Tier Architecture
THANK
YOU

You might also like