Database Systems
Database Systems
Database Systems
or Database Management
Systems (DBMS)
CPE 513
1
Course Outline
• Introduction to DBS or DBMS
• Entity-relation diagrams (ER)
• Relational model
• Converting ER to RM
• Relational Algebra and calculus as applied to
the design of database
• Structured Query Language (SQL)
• Data normalization
2
Definitions
• Data: Raw, unprocessed facts. EX: 30, John, Lagos
• Information: Processed data. Ex: The age of John is 30.
• Database: Collection of related data. Data that is stored in an
organized fashion EX: Online banking system, library
management system
• Meta-data: The database definition
• DBMS: Oracle, MySQL etc.
• SQL (Structured Query Language): used to manipulate the
data in the DB.
3
Database Management System (DBMS) or Database
System (DBS)
5
Characteristics of DBMS
• File System Approach
Accounts dept Exam dept
Matric no Name Fees paid Fees due Matric no Name Course Grade
• DBMS Approach
6
Characteristics of DBMS Approach
7
Self-describing nature of the
database system
Database system: Database +Meta-data (DB definition)
8
A database that stores student and course information
9
An example of database catalogue
• Relations or tables Columns
Relation_Name No_of_columns Column_Name Data_type Belongs-To-Relation
STUDENT 4 Name Character (30) STUDENT
COURSE 3 MATRIC_NO String(14) STUDENT, GRADE_REPORT
GRADE_REPORT 3 LEVEL Integer (3) STUDENT
DEPARTMENT Character (20) STUDENT, COURSE
CourseName Character (20) COURSE
CourseCode String (6) COURSE, GRADE_REPORT
Grade Character (1) GRADE_REPORT
10
Support of Multiple Views of the
Data
• A database has many users, each of whom may
require a different view of the database
11
Sharing of Data and Multiuser Transaction
Processing
• A multiuser DBMS allows multiple users to access the
database at the same time.
• DBMS must include concurrency control.
• OLTP (Online Transaction Processing), a major part of
database application
• DBMS must enforce several transaction properties:
i) Isolation ii) Atomicity
12
Database Users
• Actors on the Scene: whose job involves using large databases
everyday
• Database administrators
• Database designers
• End users
• System analysts and application programmers (software engineers)
• Workers Behind the Scene: maintain the database system
environment
• System designers and implementers
• Operators and maintenance personnel
13
Actors on the Scene
• Database Administrators:
• In database environment, primary resource (database),
secondary resource (DBMS and related software)
• Database administrator (DBA) responsibilities:
1. Administering primary/secondary resources
2. Authorizing access to the database
3. Co-ordinating and monitoring the use of database
4. Acquiring hardware and software resources as needed.
5. Troubleshooting if problem arises
6. See to any security concern
14
Actors on the Scene
• Database Designers
• Responsible for:
1. Identifying the data to be stored in the database
2. Choosing appropriate structures to represent and
store data
3. Communicating with database users – understand
their requirements – designs database
4. Develop views for each group of users
15
Actors on the Scene
• End users:
• End users: people whose jobs require access to the
database – for querying, updating, generating reports.
• Several categories of end users:
• Casual end users: Accesses DB occasionally.
Typically, middle or high-level managers or other
occasional browsers.
• Naïve or parametric end users: Constantly querying
and updating DB using canned transactions.
16
Actors on the Scene
• System Analysts and Application Programmers
(Software Engineers):
• System Analysts – They develop specifications
for canned transactions.
• Application Programmers – Test, debug,
document and maintain canned transactions.
They write the codes for the application
program.
17
Workers Behind the Scene
• System designers and implementers: Design and
implement DBMS modules and interfaces as a
software package
• Operators and maintenance personnel: Responsible
for actual running and maintenance of hardware and
software of the DBMS environment.
18
Advantages and Disadvantage of
DBMS
• Controlling redundancy
• Restricting unauthorized access
• Providing backup and recovery
• Providing multiple user interfaces
• Representing complex relationships among data
• Enforcing integrity constraints
19
Controlling redundancy
• File system approach
Accounts dept Exam dept
Matric no Name Fees paid Fees due Matric no Name Course Grade
20
Restricting unauthorized access
• When multiple users share a large database, the
type of access operation must be controlled.
• DBMS must provide security and authorization
subsystem.
• DBA – creates accounts and specifies account
restrictions.
21
Providing Backup and Recovery
22
Providing Multiple User Interfaces
• Multiple users – different levels of technical knowledge – so
DBMS should provide a variety of user interfaces.
• Ex: Query language interface (casual users), programming
language interfaces – application programmers, forms,
menu-driven interfaces.
• Form-style interfaces and menu-driven interfaces – Graphical
user interfaces (GUI)
23
DBMS Interfaces
• Menu-based Interfaces:
• These interfaces present the users with a list of options (menus)
• Most popular – Pull-down menus
24
DBMS Interfaces
• Forms-Based Interfaces:
• Displays a form to each user.
25
Representing Complex Relationships among Data
27
Disadvantage of DBMS
• Overhead costs of using DBMS:
High initial investment
Assignment 1
List and explain other disadvantages of DBMS.
28