You are on page 1of 27

Intructor: Deogratias N.

DATABASE MANAGEMENT SYSTEMS


Adventist University of Central Africa (AUCA)

As we work in connection with the Great Teacher, the mental


faculties are developed. The conscience is under divine guidance.
Christ takes the entire being under His control.
T.C. Vol. 6 P.421

DBMS Gishushu, December 2020


Course Contents
2
UNIT-I Introduction to Databases
Introduction, data, information, database, database management system, what is database system, purpose of database system, view of data,
traditional database systems, Relational databases, database architecture.
UNIT-II Database system concepts and architecture
Data Models, Schemas, and instances; three-schema architecture and data independence; database languages; centralized and client/server
architectures for DBMS; three-tier client/server Architecture for web applications; classification of Database Management Systems.
UNIT-III Data Modeling for Database Design
Conceptual Data Models for Database Design; entity types, entity sets, attributes, and keys; Relationship types, Relationship Sets; Weak Entity
Types; ER Diagram, Naming Conventions and Design Issues; Enhanced Entity Relationship and UML Modeling(i.e. Subclasses, super classes,
inheritance, specialization and generalization); Relational data model and Relational database constraints. Finally, Relational Database Design
using ER-to-Relational Mapping.
UNIT-IV Relational Algebra
Relational Algebra Operations from set theory; Additional Relational Operations; Examples of Queries in Relational Algebra;
UNIT-V Schema Definition, Basic Constraints, and Queries
SQL Data Definition and Data Types(The CREATE TABLE command in SQL, Specifying Basic Constraints in SQL, Specifying Key and Referential
Integrity Constraints, NOT NULL, CHECK and UNIQUE constraints), Schema change statements in SQL(The Drop Command, The Alter Command,
The Update Command);The SELECT-FROM-WHERE Structure of Basic SQL Queries; Unspecified WHERE Clause and Use of the Asterisk; Tables
as Sets in SQL; Substring Pattern Matching and Arithmetic Operators; Ordering of Query Results; More Complex SQL Queries; Comparisons
Involving NULL and Three Valued Logic; Nested Queries, Tuples, and Set/MultisetComparisons; Correlated Nested Queries; The EXISTs and
UNIQUE Functions in SQL; Renaming of Attributes in SQL; Joined Tables in SQL; aggregate Functions in SQL; Grouping(the GROUP BY and
HAVING Clauses), INSERT, DELETE, and UPDATE Statements in SQL; VIEWS(Virtual Tables) in SQL.
UNIT-VI Functional Dependencies and Normalization
Functional Dependencies, Normal Forms Based on Primary Keys, General Definitions of 1NF, 2NF, and 3NF, Boyce-CoddNormal Form

December 2020
Introduction to Databases
3 Chapter 1: Databases and Database Users
Main points:

• Database role with today’s society


• Evolution of the Database Systems-Categories of Databases
• Fundamental of Database Technology-Database System
• An example of Database: University Database
• Characteristics of a Database
• File based Approach Vs Database Approach
• Advantages & Disadvantages of Using the DBMS
•Actors on the Scene and Workers behind the Scene
Intructor: Deogratias N. December 2020
Database role with today’s society
4

Databases and database technology have a major


impact on the growing use of computers. It is fair to
say that databases play a critical role in almost all
areas where computers are used, including business,
electronic commerce, engineering, medicine, law,
education, and library science.

Intructor: Deogratias N. December 2020


Evolution of the Database Systems
5

Categories of Databases based on evolution:


 Traditional databases in which most of the information that is stored and
accessed is either textual or numeric.
 Multimedia databases where data stored are like images, audio clips,
and video streams digitally.
 Geographic information systems (GIS) which can store and analyze maps,
weather data, and satellite images.
 Data warehouses and online analytical processing (OLAP) systems used
in many companies to extract and analyze useful business information from
very large databases to support decision making.
 Real-time and active database technology used to control industrial and
manufacturing processes.

Intructor: Deogratias N. December 2020


Understanding the Database System
6

A simplified database system environment How the “Database System” works?


[Illustration]
Users/Programmers
use Applications programs and
send queries to DBMS, then this last
one processes them by defining,
constructing, manipulating and
sharing databases among those
different users. So, it plays the role
of intermediate between users and
the database itself. Databases
always store data and the
description of those data
(“Metadata”).
Intructor: Deogratias N. December 2020
Database System concepts
7

 Database is defined as “A shared collection of logically related data, and a


description of this data, designed to meet the information needs of an
organization” Or it is understood as “a self-describing collection of integrated
records”. Self-describing means that in addition to the users’ source data, a
description of its own structure. This is called a data dictionary or data
directory or metadata.
Some Examples of Database Applications [More Explanation on p. 5-6 Database Systems]

 Purchases from the supermarket


 Purchases using your credit card
 Booking a holiday at the travel agents
 Using the local library
 Taking out insurance
 Renting a video
 Using the Internet
 Studying at university
Intructor: Deogratias N. December 2020
Database System concepts
8

A database management system (DBMS) is a collection of programs that


enables users to create and maintain a database. The DBMS is a general-
purpose software system that facilitates the processes of defining, constructing,
manipulating, and sharing databases among various users and applications.

Other important functions provided by the DBMS include protecting the


database and maintaining it over a long period of time. Protection includes
system protection and security protection.

Examples of DBMS
❑ SQL (Structured Query Language)
❑ Oracle
❑ MySQL
❑ Microsoft Office Access

Intructor: Deogratias N. December 2020


Database System concepts
9

An application program accesses the database by sending


queries or requests for data to the DBMS. A query typically
causes some data to be retrieved; a transaction may cause
some data to be read and some data to be written into the
database.

These programs can be conventional batch applications or, more


typically nowadays, they will be online applications. The
application programs may be written in some programming
language (like Java Programming or .NET) or in some higher-
level fourth-generation language.

Intructor: Deogratias N. December 2020


An example of Database: University Database
10

A University
Database for

maintaining
information
concerning
students,
courses, and
grades

in a university
environment.

&&&

Intructor: Deogratias N. December 2020


File-Based System Approach
11

▪ File-Based meaning

o Collection of application programs that perform services for


the end users.
o Each program defines and manages its own data.
o Traditional file based system is basically a file based
system, in which we manually or through computer handle
the database operations such as insertion (adding new files
), updating (modifying existing files) or deletion of files to
database etc. Read more on P.7-14 Thomas’ book.

Intructor: Deogratias N. December 2020


File-Based System Approach Illustration
12

Intructor: Deogratias N. December 2020


Limitations of File-Based Approach
13

 Separation and isolation of data


 Each program maintains its own set of data.
 Users of one program may be unaware of potentially useful data held by other
programs.
 Duplication of data
 Same data is held by different programs.
 Wasted space and potentially different values and/or different formats for the same
item.
 Data dependence
 File structure is defined in the program code
 Program-Data Dependence. File descriptions are stored within each application
program that accesses it
 Data integrity problem(ability to force records to be consistent)
 Limited data sharing
Intructor: Deogratias N. December 2020
Database Approach
14

Came because:

❑ Definition of data was embedded in application programs,


rather than being stored separately and independently.
❑ No control over access and manipulation of data beyond that
imposed by application programs.

Result:

 The database and Database Management System (DBMS).

Intructor: Deogratias N. December 2020


Database Approach Illustration
15

Intructor: Deogratias N. December 2020


Database Approach Facilities
16

Typically, a DBMS provides the following facilities:


 Data definition language (DDL)

 Permits specification of data types, structures and any data


constraints.
 All specifications are stored in the database.
❑ Data manipulation language (DML)
❑ General enquiry facility (query language) of the data.
❑ Controlled access to database may include:
❑ A security system
❑ An integrity system
❑ A concurrency control system
❑ A recovery control system
Intructor: Deogratias N. December 2020
Database Approach Characteristics
17

The main characteristics of the database approach


versus the file-processing approach are the following:

■ Self-describing nature of a database system


■ Insulation between programs and data, and data
abstraction
■ Support of multiple views of the data
■ Sharing of data and multiuser transaction
processing
Intructor: Deogratias N. December 2020
Database Approach Characteristics
18

Self-Describing Nature of a Database System

A fundamental characteristic of the database


approach is that the database system contains not
only the database itself but also a complete definition
or description of the database structure and
constraints.

Intructor: Deogratias N. December 2020


Database Approach Characteristics
19

Insulation between Programs and Data, and Data Abstraction

In traditional file processing, the structure of data files is


embedded in the application programs, so any changes
to the structure of a file may require changing all
programs that access that file. By contrast, DBMS access
programs do not require such changes in most cases. The
structure of data files is stored in the DBMS catalog
separately from the access programs. We call this
property “program-data independence”.
Intructor: Deogratias N. December 2020
Database Approach Characteristics
20

Support of Multiple Views of the Data


❑ Meaning of View
A database typically has many users, each of whom may require
a different perspective or view of the database. A view may be
a subset of the database or it may contain virtual data that is
derived from the database files but is not explicitly stored.
❑ Views’ Benefits

(a) Reduce complexity (b) Provide a level of security (c) Provide a


mechanism to customize the appearance of the database
(d) Present a consistent, unchanging picture of the structure of the
database, even if the underlying database is changed.
Intructor: Deogratias N. December 2020
Database Approach Characteristics
21

Sharing of Data and Multiuser Transaction Processing

A multiuser DBMS, as its name implies, must allow


multiple users to access the database at the same
time. This is essential if data for multiple applications
is to be integrated and maintained in a single
database. 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.
Intructor: Deogratias N. December 2020
Some Advantages of DBMSs
22

Read more Database Systems Thomas C. & Carolyn B. P.77-80

 Control of data redundancy


 Data consistency
 Sharing of data
 Improved data integrity
 Improved security
 Improved data accessibility and responsiveness
 Increased productivity
 Improved maintenance through data independence
 Increased concurrency
 Improved backup and recovery services

Intructor: Deogratias N. December 2020


Some Disadvantages of DBMSs
23

Read more Database Systems Thomas C. & Carolyn B. P.80-81

 Complexity
 Size
 Cost of DBMS
 Additional hardware costs
 Higher impact of a failure

Intructor: Deogratias N. December 2020


Actors on the Scene and Workers behind the Scene
24

Read more Fundamental of Database System P.14-17


 Actors on the Scene [the people whose jobs involve the day-to-day use of a
large database]
◼ Database Administrators;
The DBA is responsible for authorizing access to the database, coordinating and
monitoring its use, and acquiring software and hardware resources as needed. The
DBA is accountable for problems such as security breaches and poor system
response time.
◼ Database Designers;
Database designers are responsible for identifying the data to be stored in the
database and for choosing appropriate structures to represent and store this data.
It is the responsibility of database designers to communicate with all prospective
database users in order to understand their requirements and to create a design
that meets these requirements. The final database design must be capable of
supporting the requirements of all user groups.

Instructor: Deogratias N. December 2020


Actors on the Scene and Workers behind the Scene
25

Read more Fundamental of Database System P.14-17


 Actors on the Scene [Continued]
▪ 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.

There are several categories of end users:


✓ Casual end users
✓ Naive or parametric end users
✓ Sophisticated end users
✓ Standalone users

Instructor: Deogratias N. December 2020


Actors on the Scene and Workers behind the Scene
26

Read more Fundamental of Database System P.14-17


 Actors on the Scene [Continued]
◼ Software Engineers divided into two categories: System
Analysts and Application programmers;
o System analysts determine the requirements of end users, especially
naive and parametric end users, and develop specifications for
standard canned transactions that meet these requirements.
o Application programmers implement these specifications as programs;
then they test, debug, document, and maintain these canned
transactions.
Such analysts and programmers—commonly referred to as software
developers or software engineers—should be familiar with the full range
of capabilities provided by the DBMS to accomplish their tasks.

Instructor: Deogratias N. December 2020


Actors on the Scene and Workers behind the Scene
27

Read more Fundamental of Database System P.14-17


 Workers behind the scene [those who work to maintain the database
system environment but who are not actively interested in the database contents
as part of their daily job]
◼ DBMS system designers and implementers
DBMS system designers and implementers design and implement the
DBMS modules and interfaces as a software package.
◼ Tool developers design and implement tools—Tools are optional
packages that are often purchased separately.
◼ Operators and maintenance personnel (Also called “System
administration personnel”, are responsible for the actual running and
maintenance of the hardware and software environment for the database
system.

Instructor: Deogratias N. December 2020

You might also like