CPIS-241
Introduction to
Database
Management Systems
Aisha Megbil
Create: Dr. HALIMA SAMRA
Introduction
Objectives
Understand the basic concept of data management
Identify the two approaches to data management
Learn the file-based approach and its drawbacks
Learn the database approach
Understand the basic database terminologies and elements
Learn about the database types and their characteristics
Learn the database design process through the database lifecycle
Know the components of a database system
Understand the functions of a database application
Learn the purpose of the database management system (DBMS)
Learn database systems types (personal & organizational)
Data Management
• Data management is the practice of collecting, storing, and using data safely,
efficiently, and cost-effectively.
• The goal of data management is to help people, organizations, and connected things
improve the use of data for better decisions.
Over the past few decades, computers have been used to manage data digitally in
various ways. One way to keep information on a computer is to store it in permanent
files using a file-based system. However, other approaches were developed to
manage large amounts of organizational information such as database approach.
https://www.oracle.com/sa/database/what-is-data-management/
File-based Approach
• In this approach each application had its
own set of data files. Much of the data in
these files may already be present in
existing files for other applications.
• Due to the lack of uniformity or
standards it was considered easier and
simpler to design new data files for each
application.
Drawbacks of File-based Approach
Data redundancy and inconsistency
The same data may be stored in multiple files. The consequence of this is that
storage space is wasted, data may have to be entered several times to update all
occurrences of a data item and the data may become inconsistent
Data Dependencies
This implies that each data file can only be associated with a given application. ( test
file, binary file, …etc.)
Drawbacks of File-based Approach (cont.)
Data isolation
data are scattered in various files; Each application has its own
private data files and there is little opportunity for users to share data outside of their
own applications.
Poor Enforcement of Standards
Each file can be written differently according to the programmer's views. While
Standards are required for naming attributes and data type.
Security problems
Difficult to apply security constraints and control user access to some, but not all, data.
Database Approach
Database technology can cut through many of the problems that
traditional file organization creates.
The database is a collection of data organized to serve many
applications efficiently by centralizing the data and controlling
redundant data. Rather than storing data in separate files for each
application, data are stored so as to appear to users as being stored
in only one location. A single database services multiple applications.
In this approach all access to data is achieved by requests to the
Database Management System (DBMS) software.
To understand the fundamental of database system, we start from introducing the basic concepts in this area.
https://paginas.fe.up.pt/~acbrito/laudon/ch7/chpt7-2fulltext.htm
What is Data ? • Data is referred to as “raw” facts such as text,
graphics, images, sound and video that could
be recorded and stored on computer media.
• The term data and information are closely
What is information ? related. Information is defined as data that has
been processed into a meaningful form. Data
must be transformed in order to produce
information that can be used in any decision-
making process.
• The term transformation is used to describe
any process that changes data into
information. Tabulated reports and graphs are
examples of data transformation.
• A database is defined as an organized
What is a Database ? collection of logically related data. A
database can be of any size and
complexity.
• The data must be structured to ensure
that it can be easily stored, manipulated
and retrieved.
Examples
What kind of data needs to be maintained in each system?
What kind of data needs to be maintained in each system?
Student Record System
Students, Subjects, Courses, Results
Video Borrowing System
Videos, Members, Distributors, Borrowings
Product Ordering System
Products, Customers, Sales representatives, Suppliers, Orders
How is the data structured within a database ?
The data within a database is not stored together collectively. The data is
structured into “entities” and each entity is stored and maintained separately.
Therefore, a database may consist of one or more entities.
• Example:
• Student Record System
• The entities of this system are Students, Subjects, Courses ,and Results. The Student data
is stored separately within the database as is the Subject data, Course data and the
Results data.
Maintaining Relationships
• Although each entity is stored and maintained separately within a database.
• Relationships or rules that exist between entities must also be maintained
within the database.
• Example: Student Record System
Relationships between components
• A Student may enroll in many Subjects and a
Subject may have many Students enrolled in it.
• A Course may have many Students enrolled in it
and a Student may only be enrolled in one Course
at any one time.
• A Subject may be taught in many Courses and
Course may have many Subjects taught within it.
Entity
• An entity is a thing with distinct and independent existence.
• Each entity in a database has certain characteristics known as
attributes that describe it.
• When designing an entity, the number of attributes required
will be determined by:
business rules and operational requirements.
• Each attribute should be named in such a way that it easily
reminds a user of its contents.
Data Types
• When a database is physically implemented into a computer system
each attribute must be assigned a specific data type. A data type
determines the kind of data that can be stored and the permitted
operations for that attribute.
• Examples of data types are Alphanumeric, text, Numeric, Decimal,
Date, and Boolean.
Data Types
Example: Student Entity
Other Data types:
• CHAR , VARCHAR , TEXT ( texts)
• INT , FLOAT, DOUBLE (numbers)
• BLOB - binary data ( video, audio)
Data Dictionary
• A data dictionary is used in order to keep track of individual databases
with a database system. A data dictionary contains data descriptors
called metadata that define the source, the use, the value, and the
meaning of data.
Example: Data Dictionary (Student )
Databases are Everywhere
University Hospital
Retail store Gym
Library
Types of Databases
Databases can be classified according to their structure and functionality into
two main types:
1. Operational databases
2. Analytical databases
Types of Databases
1. Operational databases
Operational databases are used to store and process data in real-time.
Operational databases Characteristics
Designed to support high volume transaction processing
Typically concerned with current data
Designed for real-time business processes
Supports thousands of concurrent clients
Exp. online transaction processing (OLTP for short) databases
https://www.scylladb.com/glossary/operational-database/
Types of Databases
2. Analytical databases
Analytical databases are primarily static, read-only databases that store archived, historical data used
for analysis. They are used by analytical applications such as SAS, SPSS, and R.
Analytical databases Characteristics
Designed to support high volume analytical processing
Typically concerned with historical data
designed for analysis of business operations
supports a small number of concurrent clients
Exp. Online analytical processing (OLAP) databases
https://www.scylladb.com/glossary/operational-database/
Database Design Analysis
• Analyze the company situation
• Define problems and constraints
• Define objectives
• Define scope and boundaries
• Create the conceptual design
• DBMS software selection
Design • Create the logical design
• Create the physical design
Database Lifecycle • Install the DBMS
Implementation • Create the database(s)
• Load or convert the data
• Test the database
Testing • Fine-tune the database
• Evaluate the database
Operation • Produce the required information flow
• Introduce changes
Maintenance • Make enhancements
https://www.programmersought.com/article/83851195596/
Database Design Phase 1: Analysis
This is the stage where the existing system is reviewed.
What data are required?
What are the problems to be solved?
Steps in the analysis phase
Identify any
Analyze the problems, Define the Agree on the
organization possibilities, or objectives scope
limitations
https://mariadb.com/kb/en/database-design-phase-1-analysis/
Database Design Phase 2: Design
In this stage the business understanding of the data structures is converted to a
technical understanding.
How will the data be structured?
How is the data to be accessed?
DBMS software
selection
This phase consists of three parts:
The conceptual The logical The physical
design design design
https://mariadb.com/kb/en/database-design-phase-1-analysis/
Database Design Phase 3: Implementation
This stage is related to installing the DBMS on the required hardware, creating the
database and loading the data.
Steps in the implementation phase:
1. Install the DBMS.
2. Adjust setting parameters according to hardware, software, and conditions of use.
3. Create the database and tables.
4. Load the data.
5. Set up users and security.
6. Implementation of a backup system.
https://mariadb.com/kb/en/database-design-phase-1-analysis/
Database Design Phase 4: Testing
This stage is related to performance, security and data integrity testing.
Steps in the testing phase:
1. Test the performance.
2. Test the security
3. Test the data integrity
4. Fine-tune the parameters or modify the logical or physical designs in response to the tests.
https://mariadb.com/kb/en/database-design-phase-1-analysis/
Database Design Phase 5: Operation
This stage occurs when testing is complete, and the database is ready to run for
daily use. System users start the system, load data, read reports, etc .
Steps in the operation phase:
1. Handing over the database process to users.
2. Make any final changes based on the issues users discovered.
https://mariadb.com/kb/en/database-design-phase-1-analysis/
Database Design Phase 6: Maintenance
The maintenance phase includes the general maintenance of the database contents,
as well as making changes when for new requirements or changes occur in the
organization.
Steps in the maintenance phase:
1. Maintain the indexes
2. Maintain the tables
3. Maintain the users
4. Change passwords
5. Prepare backup
6. Restore backups
7. Change the design to meet new requirements
https://mariadb.com/kb/en/database-design-phase-1-analysis/
Database Systems
Database systems are basically developed for large amount of data. When dealing with huge amount of data,
there are two things that require optimization: Storage of data and retrieval of data.
The main purpose of database systems is to manage the data. Consider a university that keeps the data of
students, teachers, courses, books etc.
The four components of a database system are:
• Users
• Database Application
• Database Management System (DBMS)
• Database Figure 1-15: Components of a Database System
KROENKE and AUER - DATABASE CONCEPTS (6th Edition) Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Components of a Database System
Users
https://www.guru99.com/what-is-dbms.html
Components of a Database System
Database Applications
• A database application is a set of one or more computer programs that serves
as an intermediary between the user and the DBMS.
Functions of Database Applications
• Create and process forms
• Process user queries
• Create and process reports
• Execute application logic
• Control database applications
KROENKE and AUER - DATABASE CONCEPTS (6th Edition) Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Components of a Database System
Database Applications
• Example: Data Entry Form
Figure 1-20: Example Data Entry Form
KROENKE and AUER - DATABASE CONCEPTS (6th Edition) Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Components of a Database System
Database Applications
• Example: Query
Figure 1-21: Example Query
KROENKE and AUER - DATABASE CONCEPTS (6th Edition) Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Components of a Database System
Database Applications
• Example: Report
Figure 1-22: Example Report
KROENKE and AUER - DATABASE CONCEPTS (6th Edition) Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Components of a Database System
Database Management System (DBMS)
• A DBMS is a technology tool that directly supports data management.
• It is a package designed to define, manipulate, and manage data in a database.
• A DBMS serves as an intermediary between database applications and the
database.
• The DBMS manages and controls database activities.
KROENKE and AUER - DATABASE CONCEPTS (6th Edition) Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Components of a Database System
Database Management System (DBMS)
Functions of a DBMS
• Create databases
• Create tables
• Create supporting structures
• Read database data
• Modify database data (insert, update, and delete)
• Maintain database structures
• Enforce rules
• Control concurrency
• Provide security
• Perform backup and recovery
KROENKE and AUER - DATABASE CONCEPTS (6th Edition) Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Components of a Database System
The Database
• A database is a self-describing collection of related records.
• The database itself contains the definition of its structure.
• Metadata is data describing the structure of the database data.
• Tables within a relational database are related to each other.
KROENKE and AUER - DATABASE CONCEPTS (6th Edition) Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Types of Database Based on Number of Users
The number of users determines whether the database is classified as a single
user or a multi-user.
Single user database supports only one user at a time, for example, a single user
database running on a PC is called desktop database or personal database.
A multiuser database supports multiple users at the same time, When a
database is used by the entire organization and supports many users across many
departments, the database is known as an organizational database or enterprise
database.
http://www.myreadingroom.co.in/notes-and-studymaterial/65-dbms/463-types-of-databases.html#:~:text=Multi%20User%20Database%3A&text=When%20the%20database%20is%20used,known%20as%20an%20enterprise%20database.
Personal Database Systems
A personal database system is a local database system that is used by a single user
to store and manage data and information on their personal system.
• Personal database systems typically
• have one application.
• have only a few tables.
• are simple in design.
• involve only one computer.
• support one user at a time.
KROENKE and AUER - DATABASE CONCEPTS (6th Edition) Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Personal Database Systems
Figure 1-23: Personal Database System
KROENKE and AUER - DATABASE CONCEPTS (6th Edition) Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Personal Database Systems
Most personal database systems offer a user-friendly approach to database
manipulation through visual query interfaces.
An SQL Query in Microsoft Access
Figure 1-24: SQL Generated by Microsoft Access Query
KROENKE and AUER - DATABASE CONCEPTS (6th Edition) Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
Enterprise-Class Database Systems
An enterprise database designed focused to improve productivity and
efficiency of the organization.
Enterprise-Class database systems typically:
• support several users simultaneously,
• include more than one application,
• involve multiple computers,
• are complex in design,
• have many tables, and
• have many databases.
Enterprise-Class Database Systems
Figure 1-26 Enterprise-Class Database System
Commercial DBMS Products
• Example of Desktop DBMS Products
• Microsoft Access
• Examples of Organizational DBMS Products
• Microsoft’s SQL Server
• Oracle’s Oracle
• Sun Microsystem’s MySQL
• IBM’s DB2
• MariaDB Enterprise
References
1. Rob,P, Morris,S & Coronel,C.& Database Systems, Design, Implementation, and Management, 10th Ed,
Thomson Course Technology ISBN: 13:978-1-111-96960-8
2. Silberschatz, Korth and Sudarshan Database System Concepts, 5th Ed.
3. https://mariadb.com/kb/en/database-lifecycle/
4. https://beginnersbook.com/2015/04/dbms-introduction/
5. https://databasetown.com/personal-database-functions-advantages/