Chapter One Introduction to Database
Chapter One Introduction to Database
• Software: Programs and applications that enable the system to function, including
operating systems, database management systems, application software, and utilities.
• Data: Raw facts and figures that are collected, stored, and processed by the system.
This can include text, numbers, images, audio, and video.
• People: Individuals who use, manage, and maintain the system. This includes users,
developers, analysts, and IT professionals.
• Processes: Procedures and rules that govern how the system operates and how data is
collected, processed, and used.
• Networks: The communication infrastructure (e.g., the Internet, local area networks)
that allows components of the system to connect and share data.
DB course is about:
– How to organize data
• Supporting multiple users
• Efficient and effective data retrieval
• Secured and reliable storage of data
• Maintaining consistent data
• Making information useful for decision making
A database system is basically a computerized record keeping
system.
• Users of the database can perform a variety of operations.
Such as:
– Adding new data to empty file
– Adding new data to existing file
– Retrieving data from existing file
– Modifying data to existing file
– Deleting data from existing file
– Searching for target information
Data handling approaches or data handling methods
1. Manual Approach
2. Traditional File Based Approach
3. Database Approach
Manual Approach
– Data storage and retrieval follows the primitive and traditional
way of data/information handling where cards and papers are used
for the purpose.
– Typing the data on paper and put in a file cabinet
– storage and retrieval will be performed using human labor.
– Storing and organizing data using physical files, folders, and
cabinets.
– Tools: File cabinets, folders, labels, index cards.
– Example: Maintaining employee records in physical personnel
files.
– Works well if the number of items to be stored is small
Manual Data Summarization and Reporting:
6
Limitations of the Manual approach
– Prone to error
– Problem of efficiency
– There were, and still are, several computer applications with file based
processing for the purpose of data handling
– In such systems, every application program that provides service to
end users define and manage its own data.
– Such systems have number of programs for each of the different
applications in the organization.
– This approach to meet the data processing needs of individual
departments rather than the overall information needs of the
organization.
– In a traditional file-based approach, data is stored in separate,
unstructured files managed by different departments.
File based Approach (Cont’d)
File: students.txt
Structure:
StudentID | Name | Address
1 | Alice | 123 Main St
2 | Bob | 456 Elm St
Registrar's Office
File: registrations.txt
StudentID | CourseCode | Semester
1 | CS101 | Fall2024
2 | MATH202 | Spring2024
14
Limitations of the File Based approach
– Duplication of data (Redundancy)
data duplication occurs when the same data is stored
redundantly across multiple files managed by different
applications
• This redundancy arises because each application typically
has its own set of data files, with no centralized
mechanism to share or synchronize data. This leads to
wasted storage space, inconsistency, and update
anomalies (where changes in one file are not reflected in
others).
– Inconsistency
Consequences:
1. Data Inconsistency:
Two versions of Bob’s email exist, leading to confusion. For example,
emails sent by the exam department will fail to reach him.
2. Wasted Storage:
• The same data (StudentID, Name, Email) is stored twice, consuming
unnecessary disk space.
Consequence of duplication (Cont’d)
3. Update Anomalies:
• A simple change requires manual updates in multiple files. If one file is
missed, the data becomes inconsistent.
– Program-data Dependence
• File descriptions are stored within each database application
program that accesses a given file
• Because the program contains a detailed file description for
these files, any change to a file structure requires
corresponding changes to the program code
– Separation/Isolation of data:
• Available information in one application may not be
known. Data is fragmented across multiple files, and there
is no mechanism to link or integrate related data from
different files.
• Generating a report like “Students enrolled in CS101 with
unpaid fees” requires manual merging of registrations.txt
and payments.txt in custom code.
– Security Issues
• File permissions are managed at the OS level. If payments.txt is
accidentally made readable to all, sensitive data is exposed.
Limitations of the File Based approach(Cont’d)
– Concurrency Problems
• If two departments attempt to update students.txt
simultaneously (e.g., updating an address and enrolling a
new student), the file may corrupt without proper locking.
– Lengthy development and maintenance time
• 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.
Database Approach
• A Database is shared collection of logically related data (and a
(program–data independence).
Database Approach (Cont’d)
– Speed
– Accuracy
Program-data Independence
• The separation of data descriptions (metadata) from the application
programs that use the data is called data independence. With the database
approach, data descriptions are stored in a central location called the
repository. This property of database systems allows an organization’s data
to change and evolve (within limits) without changing the application
programs that process the data.
Enforcement of Standards
• These standards will include naming conventions, data quality
standards, and uniform procedures for accessing, updating, and
protecting data.
• Centralized information control
Limitations and risk of Database Approach
• Conversion Costs
– The term legacy system is widely used to refer to older applications in
an organization that are based on file processing and/or older database
technology. The cost of converting these older systems to modern
database technology— measured in terms of dollars, time, and
organizational commitment—may often seem prohibitive to an
organization.
Limitations and risk of Database Approach
• Performance Issues:
• Reduced performance due to centralization and data independency
• Large databases can sometimes slow down, especially when handling complex
• Security Risks
• Databases store sensitive information, making them a target for hackers. If not
properly secured, data breaches can occur, leading to loss or theft of information.
system
.
Components of a Database System
Hardware
• secondary storage media (disks, tapes and optical media)
• controllers (hard disk controller, etc.); and
the processor(s) and associated main memory
Components of a Database System(Cont’d)
• Constructing the database is the process of storing the data itself on some
database concurrently.
Components of a Database System(Cont’d)
itself but also a complete definition or description of the database structure and
constraints(like what fields exit in a table). This helps users and apps understand the
– This does not include many of the details of how the data is stored
or how the operations are implemented.
– Database users and application programs refer to the conceptual
representation of the files, and the DBMS extracts the details of
file storage from the catalog when these are needed by the DBMS
file access modules.
Fundamentals Database Systems 54
Characteristics of the Database Approach(Cont’d)
• A multiuser DBMS must allow multiple users to access the database at the same
time.
• When many people use the database at once. The system must manage conflicts,
like two users editing the same record, to keep things smooth and accurate.
• The DBMS must include concurrency control software to ensure that several
users trying to update the same data do so in a controlled manner so that the
result of the updates is correct.
• Controlling Redundancy
• Restricting Unauthorized Access
• Providing Persistent Storage for Program Objects and Data Structures
Permitting Inferencing and Actions Using Rules
• Providing Multiple User Interfaces
• Representing Complex Relationships Among Data
• Enforcing Integrity Constraints
• Providing Backup and Recovery
Advantages of Using the DBMS Approach (Cont’d)
.
Roles in the Database Environment
• The users of a database system can be classified into various
categories depending upon their interaction and degree of
expertise of the DBMS.
1. Actors on the Scene
2. Actors behind the Scene
– who are responsible for writing application programs that use the database
– Determines the interface on how to retrieve, insert, update and delete data in
the database.
– The application could use any high level programming language according to
• End users are the people whose jobs require access to the database for querying,
updating, and generating reports; the database primarily exists for their use.
• Their main job function revolves around constantly querying and updating the
database, using standard types of queries and updates—called canned
transactions—that have been carefully programmed and tested.
• Unaware of the DBMS
• Only access the database based on their access level and demand
• Use standard and pre-specified types of queries.
– Eg. Bank tellers ,reservation agents for airlines, hotels, and car rental companies
Sophisticated Users
Casual Users
• In addition to those who design, use, and administer a database, others are
associated with the design, development, and operation of the DBMS software
and system environment. These persons are typically not interested in the
database itself. We call them the "workers behind the scene," and they include the
following categories.
• DBMS system designers and implementers
– design and implement tools- the software packages that facilitate database
modeling and design, database system design, and help improve performance.
Fundamentals Database Systems 80
Operators and maintenance personnel