Database Management Systems
By
Mumderanji James & Wilson Lemani
Objectives Overview
Database Data
Introduction to
Applications Organization
Data Concepts and Importance Concepts
Data
Key DBMS Data Security
Maintenance
Components and Recovery
Techniques
Types of
Databases
Kamuzu University of Health Sciences( Formerly COM & KCN) 2
Databases, Data, and Information
Database Data Information
• Collection of • Collection of • Processed data
data organized unprocessed • Documents
in a manner that items • Audio
allows access, • Text • Images
retrieval, and • Numbers • Video
use of that data • Images
• Database is a • Audio
collection of • Video
related data
Page 514 Discovering Computers 2012: Chapter 10 2
Databases, Data, and Information
• Database software, often called a database
management system (DBMS), allows users to:
Create a computerized Add, modify, and
database delete data
Create forms and
Sort and retrieve data
reports from the data
Page 515 Discovering Computers 2012: Chapter 10 3
Databases, Data, and Information
• Data integrity identifies the quality of the data
• Garbage in, garbage out (GIGO) points out the
accuracy of a computer’s output depends on the
accuracy of the input
Page 516 Discovering Computers 2012: Chapter 10 3
Database Applications:
• Banking: all transactions
• Airlines: reservations, schedules
• Universities: registration, grades
• Sales: customers, products, purchases
• Online retailers: order tracking, customized
recommendations
• Manufacturing: production, inventory, orders, supply
chain
• Human resources: employee records, salaries, tax
deductions
Databases touch all aspects of our lives
Purpose of Database Systems
• In the early days, database applications were built
directly on top of file systems
• Drawbacks of using file systems to store data:
Data redundancy and inconsistency
• Multiple file formats, duplication of information in
different files
Difficulty in accessing data
• Need to write a new program to carry out each
new task
Data isolation — multiple files and formats
Integrity problems
• Integrity constraints e.g. account balance > 0)
become “buried” in program code rather than
being stated explicitly
• Hard to add new constraints or change existing ones
Purpose of Database Systems (Cont.)
• Drawbacks of using file systems to store data cont:
Atomicity of updates
• Failures may leave database in an inconsistent state with
partial updates carried out
• Example: Transfer of funds from one account to another
should either complete or not happen at all
Concurrent access by multiple users
• Concurrent accessed needed for performance
• Uncontrolled concurrent accesses can lead to
inconsistencies
• Example: Two people reading a balance and updating it at
the same time
Security problems
• Hard to provide user access to some, but not all, data
• Database systems offer solutions to all the above problems
The Hierarchy of Data
• Data is organized in layers
– Files, records, fields, characters
Page 517 Discovering Computers 2012: Chapter 10 5
Figure 10-2
The Hierarchy of Data
• A character is one byte
– Numbers, letters, space,
or other symbols
• A field is a combination
of one or more related
characters
– Field name
– Field size
– Data type
Page 518 Discovering Computers 2012: Chapter 10 6
Figure 10-3
The Hierarchy of Data
• Common data types include:
Text Numeric Currency
AutoNumber
Date Memo Yes/No Hyperlink
Object Attachment
Page 518 7
Discovering Computers 2012: Chapter 10
The Hierarchy of Data
• A record is a group of related fields
– A primary key uniquely identifies each record
• A data file is a collection of related records
Page 519 8
Discovering Computers 2012: Chapter 10
Figure 10-4
Maintaining Data
• File maintenance refers to the procedures that
keep data current
Adding Modifying
records records
Deleting
records
Page 520 9
Discovering Computers 2012: Chapter 10
Maintaining Data
File maintenance-Adding
• Users add new records to a file when they obtain
new data
Page 520 Discovering Computers 2012: Chapter 10 10
Figure 10-5
Maintaining Data
File maintenance-Modifying
• Users modify a record to correct inaccurate data
or update old data
Page 521 Discovering Computers 2012: Chapter 10 11
Figure 10-6
Maintaining Data
File maintenance-Deleting
• When a record no longer is needed, a user deletes
it from a file
Page 522 Discovering Computers 2012: Chapter 10 11
Figure 10-6
Maintaining Data
• Validation compares data with a set of rules or
values to find out if the data is correct
Alphabetic/Numeric
Range check Consistency check
check
Completeness check Check digit Other checks
Pages 522 - 524 Discovering Computers 2012: Chapter 10 17
File Processing Versus Databases
File processing system Database approach
• Each department has its • Programs and users
own set of files share data
• Used for many years • Reduce data
• Have data redundancy redundancy
• Isolate data • Improve data
integrity
• Share data
• Allows easier
access
Pages 522 - 524 • Chapter
Discovering Computers 2012:
Reduces10
development 18
Database Management System (DBMS)
• DBMS contains information about a particular
enterprise/entity
Collection of interrelated data
Set of programs to access the data
An environment that is both convenient and
efficient to use
Database Management Systems
• A data dictionary contains data(metadata) about
each file in the database and each field in those
files
Pages 527 – 528 15
Discovering Computers 2012: Chapter 10
Figure 10-12
Database Management Systems
• A DBMS provides several tools that allow users
and programs to retrieve and maintain data in the
database Query language
Query by example
Form
Report generator
Page 528 Discovering Computers 2012: Chapter 10 21
Database Management Systems
• A query language consists of simple, English-like
statements that allow users to specify the data to
display, print, or store
• Query by example (QBE) provides a GUI to assist
users with retrieving data
Page 528 Discovering Computers 2012: Chapter 10 22
Database Management Systems
• A form is a window on the screen that provides
areas for entering or modifying data in a database
Page 530 Discovering Computers 2012: Chapter 10 18
Figure 10-15
Database Management Systems
• A report generator allows users to design a report
on the screen, retrieve data into the report
design, and then display or print the report
Page 531 Discovering Computers 2012: Chapter 10 19
Figure 10-16
Database Management Systems
A DBMS provides means to
ensure that only authorized users
access data at permitted times
• Access privileges
• Principle of least privilege
Page 531 Discovering Computers 2012: Chapter 10 25
Database Management Systems
• A DMBS provides a variety of techniques to
restore the database to a usable form in case it is
damaged or destroyed
Backup Log
Recovery Continuous
utility backup
Pages 531 - 532 Discovering Computers 2012: Chapter 10 26
Early Database Models: Hierarchical and
Network
• Hierarchical Model:
- Tree-like structure (parent–child)
- Each child has one parent
- Used in early systems like IBM's IMS
Early Database Models: Hierarchical
and Network
• Network Model:
- Graph-like structure with many-to-many relationships
- More flexible than hierarchical
- Example: Students ↔ Courses ↔ Lecturers
• Relational Model for simplicity, flexibility, and easier query processing
replaced the earlier models
Relational, Object-Oriented, and
Multidimensional Databases
• A data model consists of rules and standards that
define how the database organizes data
Page 533 Discovering Computers 2012: Chapter 10 22
Figure 10-18
Relational, Object-Oriented, and
Multidimensional Databases
• A relational database
stores data in tables
that consist of rows and
columns
– Each row has a primary
key
– Each column has a
unique name
• A relationship is a link
within the data
Page 533 Discovering Computers 2012: Chapter 10 30
Figure 10-20
Relational, Object-Oriented, and
Multidimensional Databases
• Structured Query Language (SQL) is a query
language that allows users to manage, update,
and retrieve data
Page 533 Discovering Computers 2012: Chapter 10 31
Figure 10-20
Relational, Object-Oriented, and
Multidimensional Databases
• An object-oriented database (OODB) stores data
in objects
• Examples of applications appropriate for an
object-oriented database include:
Multimedia Groupware
database database
Computer-
Hypertext
aided design
database
database
Page 534 Discovering Computers 2012: Chapter 10 25
Relational, Object-Oriented, and
Multidimensional Databases
• A multidimensional database can store data in more
than two dimensions of data
– Sometimes known as a hypercube
– Can consolidate data much faster than a relational
database
• A data warehouse is a large database that stores and
manages the data required to analyze historical and
current transactions
Pages 535 - 536 Discovering Computers 2012: Chapter 10 26
Web Databases
• Databases on the Web allow you to:
Shop for
products or Buy or sell stocks Search for a job
services
Make airline Register for Check semester
reservations college classes grades
Page 536 Discovering Computers 2012: Chapter 10 27
Database Administration
• It is important to have a carefully designed
database
Page 537 28
Discovering Computers 2012: Chapter 10
Figure 10-24
Database Administration
Database analysts and administrators
• Database Administrator (DBA)are responsible
for• Creates
managing and coordinating
and maintains all database
the data dictionary, activities
manages security,
monitors performance, and checks backup and recovery
procedures
Database Analyst (DA)
Decides on proper field
placement, defines data
relationship, and identifies
users’ access privileges
Page 538 29
Discovering Computers 2012: Chapter 10
Database Administration
• Employees should learn
how to use the data in
the database effectively
– Interact with database
– Identify new data for the
database
– Maintain the database
Page 538 30
Discovering Computers 2012: Chapter 10
Figure 10-25
Thank You.