DBMS - Intro 2023 - v2
DBMS - Intro 2023 - v2
Introduction
1
Objectives
• What is a database?
• Major components of a DBMS?
• Advantages of using a DBMS?
• How are databases used to build applications?
• How have DBMS changed over time?
2
Some Preliminaries
• An organized, machine-readable collection of symbols, to be
interpreted as a true account of some enterprise.
5
DBMS Definition
A collection of programs that manages the database
structure and controls access to the data stored in the
database. DBMS Offers facilities..
• Data Definition
• Data Construction
• Data Manipulation
• Data Management
7
Database File Structure
Data
Raw Facts
Data Field/ Attribute/ Column
Group of characters with specific meaning
Record / Row / Tuple
Logically connected fields that describe a
person, place, or thing
Data File / Table / Relation
Collection of related records
“Organised Collection of
Symbols”
For example:
The symbols are organised into rows and columns, thus forming a table.
One of the rows is different in kind from the others.
9
“To Be Interpreted as a True
Account”
For example (from the table just shown):
10
“Collection of Data Values”
ENROLMENT
11
What Is a Relational Database?
A database whose symbols are organised into a collection of
relations. Here is a relation, shown in tabular form:
12
Anatomy of a Relation
Anatomy of a Relation
StudentId Name CourseId
S1 Anne C1
14
Two Types of Data in Database
• Operational Data:
– Data is a set of facts and statistics can that be operated, referred or
analyzed.
– Business Data to describe the activities of an enterprise
– Stored as records in data file/table/relation
– Data may or may not have been processed.
• Metadata:
– Metadata describes relevant information about the data.
– Is also known as the System Catalog.
– It describes how, when and by whom certain data was collected as
well as the format and context of the data.
– A data dictionary is a centralized collection of data information
– Metadata is always a processed data.
Operational Data
Converting Operational Data to Information
Meta Data
Database Manages Interaction
Web Front-End
SQL I/f
Forms
SQL Commands
Meta Datab
Data File ase
Data
DBMS Features/Components
• Database engine • Report writer
– Storage • Forms generator (input
– Retrieval screens)
– Update
• Application generator
• Query Processor • Communications
• Data dictionary • 3GL Interface
• Utilities
• Security
22
DBMS Components
All Data
Database Engine
Data Dictionary
Communication 3GL
Security
Network Connector
Query Processor
Form Report
Builder Writer Program
Application
Generator
23
DBMS Engine, Security, Utilities
Product
OrderItemID Description
887 Dog food
OrderID ODate
Customer 946 Cat food
9874 3-3-97 Data
CustomerID Name
1195
9888 3-9-97
Jones Tables
2355 Rojas
Product Database
ItemID
Customer Integer, Unique Engine
Description
CustomerID Text, 100
Integer, char
Unique
Name Text, 50 char Data
Dictionary
24
Database Tables (Access)
25
Database Tables (Oracle)
26
DBMS Query Processor
All Data
Database Engine
Data Dictionary
Database Engine
Data Dictionary
Query Processor
Report Writer
Report
Format
and Query
28
Report Writer (Oracle)
29
DBMS Input Forms
All Data
Database Engine
Data Dictionary
Query Processor
Form Builder
Input
Form
Design
30
People Who Work with Databases
• Database Implementers / Designer /Back End
Developer
• End Users / Naïve User / Data Entry Operator
• Application Programmers / Front End
Developer
• DBA / System Manager
End Users
• Casual users
These are people who use the database occasionally.
• Naive users
These are users who constantly querying and
updating the database.
Eg. Reservation Clerks of Airline, Railway, Hotel, etc.
Clerks at receiving station of Courier service,
Insurance agencies, etc.
• Sophisticated Users
People who use for their complex requirements.
Eg. Engineers, Scientists, Business analysts…
• Standalone Users
Who maintain database for personal use.
DBA / System Manager
• Managing resources
• Creation of user accounts
• Providing security and User authorization
• Managing poor system response time
• System Recovery
• Tuning the Database
• Specifying the database structure
Is a File System a
= DBMS?
• Thought Experiment 1:
– You and your project partner are editing the same file.
– You both save it at the same time.
– Whose changes survive?
41
Percona's DBMS Popularity Survey
Database Systems
• Types of Database Systems
– Number of Users
• Single-user
– Desktop database
• Multiuser
– Workgroup database
– Enterprise database
– Scope
• Desktop
• Workgroup
• Enterprise
Database Systems
• Try “actors
donated to john
kerry” in your
favorite search
A “Database Query” Approach
Application Development with a DBMS
SQL Queries
Data
Database Tables
Forms, Reports,
Programs Database Server
Application Server
Users
Developers and Application Forms
Administrators
57
Web Databases
Database
Developers
Web Server
Users
data
Web forms
and reports
Reports
58
Goal: Build a Business Application
Tools:
Database
Design
SQL (queries)
Programming
Program
Design
SQL
Best:
Spend your time
on design and SQL.
Program
Design
SQL
Worst:
Compensate for poor design
and limited SQL with programming.
59
DBMS Application Design
1. Identify business rules.
4. Combine as
applications for users.
60
System Structure
Database Architecture
• two-tier architecture
• three-tier architecture