Adavanced DBMS Chap 1
Adavanced DBMS Chap 1
By A.A
Introduction to advanced database
Database is now such an integral part of our day-to-day life.
it is a collection of related data and the Database Management System (DBMS)
Database is a single, possibly large repository of data that can be used
simultaneously by many departments and users.
Instead of disconnected files with redundant data, all data items are integrated
with a minimum amount of duplication.
The database is no longer owned by one department but it is a shared corporate
resource.
The database holds not only the organization’s operational data but also a
description of this data.
12/22/2024 By A.A
DBMS
The DBMS is the software that interacts with the users’ application programs and
the database. It provides the following facilities:
It allows users to define the database, usually through a Data Definition Language
(DDL).
The DDL allows users to specify the data types and structures and the
constraints on the data to be stored in the database.
It allows users to insert, update, delete, and retrieve data from the database,
usually through a Data Manipulation Language (DML).
Having a central repository for all data and data descriptions allows the DML
to provide a general inquiry facility to this data, called a query language.
12/22/2024 By A.A
DBMS.....
It provides controlled access to the database. For example, it may provide:
A security system, which prevents unauthorized users accessing the database;
An integrity system, which maintains the consistency of stored data;
A concurrency control system, which allows shared access of the database;
A recovery control system, which restores the database to a previous
consistent state following a hardware or software failure;
A user-accessible catalog, which contains descriptions of the data in the
database.
12/22/2024 By A.A
Database application programs
Users interact with the database through a number of application programs that
are used to create and maintain the database and to generate information.
12/22/2024 By A.A
Terminologies of Database
• Data: known facts that can be recorded and have implicit meaning
12/22/2024 By A.A
Terminologies of Database cont’d…
• Database Management System (DBMS): is a collection of programs
that enables users to create and maintain a database.
12/22/2024 By A.A
Terminologies of Database cont’d…
• Table: A list of related information in column and rows.
One item of data, such as your phone number in the phone book is
called a Data value.
12/22/2024 By A.A
Basic concepts and principles of DB
• It is fair to say that DB play a critical role in almost all areas where
computers are used, including business, electronic commerce,
engineering, medicine, genetics, law, education etc…
• 12/22/2024
The database and DBMS software
By A.A together are the database system
Basic concepts and principles cont’d….
• Constructing the database is the process of storing the data on some
storage medium that is controlled by the DBMS.
12/22/2024 By A.A
Basic concepts and principles cont’d….
12/22/2024 By A.A
Basic concepts and principles cont’d….
List the names of students who took the section of the ‘Database’ course
offered in fall 2008 and their grades in that section
12/22/2024 By A.A
Basic concepts and principles cont’d….
Examples of updates include the following:
• Change the name ‘Smith’ to John
• Create a new section for the ‘Database’ course for this semester
12/22/2024 By A.A
Basic concepts and principles cont’d….
• Design of a new application for an existing database or design of a
brand new database starts off with a phase called requirements
specification and analysis.
12/22/2024 By A.A
Properties of Database
• Completeness
• Integrity
• Flexibility
• Efficiency
• Usability
12/22/2024 By A.A
Properties of Databases cont’d….
Completeness
• Ensure that users can access the data they want includes ad hoc
queries, which would not be explicitly given as part of statement of
data requirements
• Database has to support the requirements
12/22/2024 By A.A
Properties of Databases cont’d….
Integrity
• Ensures that data is both consistent (no contradictory), and
ensures that users trust the database
• Database integrity ensures that data entered into the database is
accurate, valid, and consistent
• Any applicable integrity constraint and data validation rules must
be satisfied before permitting a change to the database
12/22/2024 By A.A
Properties of Databases cont’d….
Flexibility
• Ensures that a database can evolve (without requiring excessive
effort) to satisfy changing user requirements.
• Ability to upgrade or change the functionality of database up to
the current need
• Ability to support wide area of data types
12/22/2024 By A.A
Properties of Databases cont’d….
Efficiency
• Ensures that users do not have unduly long response times when
accessing data
• The database should be able to perform effectively
• The designer has to choose the right DBMS, the right access
path in order to improve the efficiency
12/22/2024 By A.A
Properties of Databases cont’d….
Usability
• Ensures that data can be accessed and manipulated in ways
which match user requirements
• The database design that is not properly normalized will introduce
data update anomalies and data errors
• A poorly designed database may place the entire organization at
risk due to the incomplete or incorrect information
12/22/2024 By A.A
Database Applications
• A database application is set of one or more computer programs or
websites that serve as an intermediary between the user and the
DBMS for the purpose of:
Store information and relationship that are more complicated than
simple list
Provide an organizational structure for data
12/22/2024 By A.A
Types of Database system
There are two types of database systems. These are:
a. Personal Database system: personal database systems typically:
12/22/2024 By A.A
Types of Database system cont’d….
b. Enterprise-Level Database System: This systems typically:
• Support several users simultaneously (concurrent use)
12/22/2024 By A.A
Characteristics of Database approaches
• A number of characteristics distinguish the database approach from the much
older approach of programming with files
• In contrast, in a database, the names or labels of data are defined once, and
used repeatedly by queries, transactions, and applications
12/22/2024 By A.A
Characteristics cont’d….
• Data management passes through the different levels of development along
with the development in technology and services.
• Manual Approach
• Database Approach
12/22/2024 By A.A
a. Manual File Handling Systems
The primitive and traditional way of information handling where cards and
papers are mainly used. Files kept in this way are:
• Insertion and retrieval is done by searching first for the right cabinet then
for the right file then the information.
12/22/2024 By A.A
Manual File Handling cont’d…
Limitations with all manual systems
• Prone to error
Solution
• The computerized approaches evolved to overcome this limitations
• File based approach decentralised
• Database approach centralised
12/22/2024 By A.A
b. File based approach
• After the introduction of computer for data processing to the business
community, the need to use the device for data storage and
processing increase.
• There were, and still are, several computer applications with file
based processing used for the purpose of data handling.
• Since every application defines and manages its own data, the
system is subjected to serious data duplication problem
• Even though the approach evolved over time, the basic structure is
still similar but not identical.
12/22/2024 By A.A
File based approach cont’d…
• Limitations of the traditional file based approach
• Modification Anomalies
• Deletion Anomalies
• Insertion Anomalies
12/22/2024 By A.A
C. Database Approach
• A number of characteristics distinguish the database approach from the
much older approach of programming with files.
• In traditional file processing, each user defines and implements the files
needed for a specific software application as part of programming.
• For example, one user, the grade reporting office, may keep files on
students and their grades.
• A second user, the accounting office, may keep track of students’ fees
and their payments.
12/22/2024 By A.A
Database Approach cont’d…
• Although both users are interested in data about students, each user
maintains separate files and programs to manipulate these files because
each requires some data not available from the other user’s files.
• High impact on the system when failure occurs to the central system
12/22/2024 By A.A
Components of a Database System
There are five component of Database system
i. Hardware
• The DBMS and the application needs hardware to run.
• Depends on the organizations requirement and the DBMS used, some run on
a particular hardware and OS while others on a wide variety of hardware
• DBMS may have its own report forms, graphs and application generators.
iii. Data
• The most important component of DBMS from the end user point of view.
12/22/2024 By A.A
Components of a Database cont’d….
iv. Procedures
• It refers the instructions or rules that governs the design and use of the
database, which consist of:
• Log on to the DBMS.
• Use a particular DBMS facilities.
• Start and stop of DBMS.
• Making backup copies of the database.
v. People (users or actors):- people can be identified in four distinct type:
• Database Administrator
• Database Designer
• Application Developer
• End user
12/22/2024 By A.A
Actors on the Scene
People whose jobs involve the day-to-day use of a large database; we call
them the actors on the scene
Database Administrator
• In any organization where many people use the same resources, there
is a need for a chief administrator to oversee and manage resources.
12/22/2024 By A.A
Actors on the Scene cont’d…
• 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.
• In large organizations, the DBA is assisted by a staff that carries out these
functions.
12/22/2024 By A.A
Actors on the Scene cont’d….
b. 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.
• These tasks are mostly undertaken before the database is actually
implemented and populated with data
• In many cases, the designers are on the staff of the DBA and may be
assigned other staff responsibilities after the database design is completed.
12/22/2024 By A.A
Actors on the Scene cont’d….
• Database designers is also responsible to many cases like:
• The designers are on the staff of the DBA and may be assigned other
staff responsibilities after the database design is completed.
• DBDs typically interact with each potential group of users and develop
views of the database that meet the data and processing requirements
of these groups.
• Each view is then analyzed and integrated with the views of other user
groups.
12/22/2024 By A.A
Actors on the Scene cont’d….
Designers can be:
• Logical Designers
• Application programs provide the required functionality for the end user.
12/22/2024 By A.A
Actors on the Scene cont’d….
d. End users
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.
12/22/2024 By A.A
Actors on the Scene cont’d….
• Naïve or parametric end users are unsophisticated users who interact
with the system by invoking one of the application programs that have
been written previously
• Casual end users occasionally access the database, but they may
need different information each time.
• Reservation agents for airlines, hotels, and car rental companies check
availability for a given request and make reservations.
12/22/2024 By A.A
Actors on the Scene cont’d….
• Sophisticated end users: interact with the system without writing
programs. Instead, they form their requests in a database query language.
12/22/2024 By A.A
Database Development Process
• A core aspect of software engineering is the subdivision of the development
process into a series of phases, or steps, each of which focuses on one
aspect of the development.
• The software product moves through this life cycle (sometimes repeatedly as
it is refined or redeveloped) until it is finally retired from use.
• Ideally, each phase in the life cycle can be checked for correctness before
moving on to the next phase.
12/22/2024 By A.A
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.
• We call them the workers behind the scene, and they include the
following categories:
12/22/2024 By A.A
12/22/2024 By A.A