0% found this document useful (0 votes)
0 views

DBMS chap1

The document provides an overview of database management systems (DBMS), explaining the fundamental concepts of databases, including entities, attributes, and relationships. It discusses various data handling approaches, highlighting the limitations of manual and traditional file-based systems compared to the advantages of a database approach. Additionally, it outlines the roles of stakeholders in database design and development, the ANSI/SPARC database architecture, and different types of database systems.

Uploaded by

kblob2676
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

DBMS chap1

The document provides an overview of database management systems (DBMS), explaining the fundamental concepts of databases, including entities, attributes, and relationships. It discusses various data handling approaches, highlighting the limitations of manual and traditional file-based systems compared to the advantages of a database approach. Additionally, it outlines the roles of stakeholders in database design and development, the ANSI/SPARC database architecture, and different types of database systems.

Uploaded by

kblob2676
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 60

Fundamentals of Database

Management System
Chapter One: Fundamental of database system
Introduction
Database is a shared collection of logically related data and its description,
designed to meet the information needs of an organization.
The database is a single, possibly large repository of data that can be used
simultaneously by many departments and users.
The database holds not only the organization‘s operational data, but also a
description of this data.
For this reason, a database is also defined as a self-describing collection of
integrated records.
The description of the data is known as the system catalog (or data dictionary
or metadata—the ―data about data).
…cont
When we analyze the information needs of an organization, we attempt to
identify entities, attributes, and relationships.
An entity is a distinct object (a person, place, thing, concept, or event) in the
organization that is to be represented in the database.
An attribute is a property that describes some aspect of the object
a relationship is an association between entities
Databases and database systems are an essential component of life in modern
society
For example, if we go to the bank to deposit or withdraw funds, if we make a
hotel or airline reservation(what we may call traditional database applications)
and non-traditional data, such as posts, tweets, images, and video clips.
1.1 Database System
An organization must have accurate and reliable data for effective decision
making.
To this end, the organization maintains records on the various facets
maintaining relationships among them. Such related data are called a database.
Basically, database system is nothing more than a computer-based record
keeping system i.e. a system whose overall purpose is to record and maintain
information/data.
A database management system (DBMS) is a software system that allows
access to data contained in a database.
The objective of the DBMS is to provide a convenient and effective method of
defining, storing and retrieving the information contained in the database.
…cont
The DBMS interfaces with the application programs, so that the data
contained in the database can be used by multiple applications and users.
In addition, the DBMS exerts centralized control of the database, prevents
fraudulent or unauthorized users from accessing the data, and ensures the
privacy of the data.
Mere collection of data does not make it a database; the way it is organized
for effective and efficient use makes it a database.
An entity may be concrete as person or book, or it may be abstract such as a
loan or a holiday or a concept.
An entity set is a set of entities of the same type that share the same
properties or attributes.
…cont
An attribute is also referred as data item, data element, data field, etc.
Attributes are descriptive properties possessed by each member of an entity
set.
A grouping of related entities becomes an entity set
For example: In a library environment,….
Entity Set: -Catalogue –
Entity: -of Books, Journals, AV-Materials, etc.
Attributes: - contains ISBN, title, author, or publisher, etc.
…cont
1.2 Data Handling approaches
1.2.1 Manual Data Handling approach
data storage and retrieval follows the primitive and traditional way of
information handling where cards and paper are used for the purpose.
Files are used to store information
Each of the files containing various kinds of information is labelled and stored in one or
more cabinets.
The cabinets could be kept in safe places for security purpose
Insertion and retrieval is done by searching first for the right cabinet then for the right
the file then the information.
One could have an indexing system to facilitate access to the data
…cont
Limitations of the Manual approach
Difficult to update, retrieve, integrate
You have the data but it is difficult to compile the information
Limited to small size information
Cross referencing is difficult
…cont
1.2.2 Traditional File Based Data Handling approach
is a computerized way of dealing with the information.
early attempt to computerize the manual filing system.
is the decentralized computerized data handling method.
In such systems, every application program that provides service to end users
define and manage its own data
since every application defines and manages its own data, the system is
subjected to serious data duplication problem.
…cont
…cont
Limitations of the Traditional File Based approach
Separation or Isolation of Data: Available information in one application may
not be known.
Limited data sharing- every application maintains its own data.
Duplication or redundancy of data (money and time cost and loss of data
integrity)
Data dependency on the application- data structure is embedded in the
application; hence, a change in the data structure needs to change the
application as well
…cont
The limitations for the traditional file based data handling approach arise from
two basic reasons.
1. Definition of the data is embedded in the application program which makes
it difficult to modify the database definition easily.
2. No control over the access and manipulation of the data beyond that
imposed by the application programs.
The most significant problem experienced by the traditional file based
approach of data handling can be formalized by what is called ―update
anomalies.
We have three types of update anomalies;
1. Modification Anomalies: a problem experienced when one ore more data
value is modified on one application program but not on others containing the
same data set.
…cont
2. Deletion Anomalies: a problem encountered where one record set is
deleted from one application but remain untouched in other application
programs.
3. Insertion Anomalies: a problem experienced whenever there is new data
item to be recorded, and the recording is not made in all the applications.
1.2.3 Database Data Handling approach
Database is a repository for collection of computerized data files.
Database is a shared collection of logically related data and description of
data designed to meet the information needs of an organization.
Since it is a shared corporate resource, the database is integrated with
minimum amount of or no duplication.
… cont
Since a database contains information about the data (metadata), it is called a
self-descriptive collection of integrated records.
The purpose of a database is to store information and to allow users to
retrieve and update that information on demand.
Database is designed once and used simultaneously by many users.
Unlike the traditional file based approach in database approach there is
program data independence.
Each database application will perform the combination of: Creating
database, Reading, Updating and Deleting data.
… cont
Benefits of the database approach
Data can be shared
Improved accessibility of data
Redundancy can be reduced
Inconsistency can be avoided
Integrity can be maintained
Security measures can be enforced:
Improved decision support
Compactness
Speed
Less labor
Centralized information control: since relevant data in the organization will be
stored at one repository, it can be controlled and managed at the central level.
… cont
… cont
Limitations and risk of Database Approach
Introduction of new professional and specialized personnel
Complexity in designing and managing data
High cost to be incurred to develop and maintain the system
Complex backup and recovery services from the users perspective
Reduced performance due to centralization and data independency
High impact on the system when failure occurs to the central system
… cont
1.3 Roles in Database Design and Development
As people are one of the components in DBMS environment, there are group of
roles played by different stakeholders of the designing and operation of a database
system.
1.3.1 Database Designer
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.
In large database design projects, we can distinguish between two types of
designer: logical database designers and physical database designers.
The logical database designer is concerned with identifying the data (that is, the
entities and attributes), the relationships between the data, and the constraints on
the data that is to be stored in the database.
… cont
The logical database designer must have a thorough and complete
understanding of the organization‘s data and any constraints on this data (the
constraints are sometimes called business rules).
These constraints describe the main characteristics of the data as viewed by
the organization. Examples of constraints for Dream Home are:
a member of staff cannot manage more than 100 properties for rent or sale at the same
time;
The physical database designer decides how the logical database design is to be physically
realized. This involves:
Mapping the logical database design into a set of tables and integrity constraints;
Selecting specific storage structures and access methods for the data to achieve good
performance;
Designing any security measures required on the data.
… cont
1.3.2 Database Administrator
Responsible to oversee, control and manage the database resources (the
database itself, the DBMS and other related software)
Authorizing access to the database
Coordinating and monitoring the use of the database
Responsible for determining and acquiring hardware and software resources
Accountable for problems like poor security, poor performance of the system
Involves in all steps of database development
… cont
We can have further classifications of this role in big organizations having huge
amount of data and user requirement.
A. Data Administrator (DA): is responsible on management of data resources.
This involves in database planning, development, maintenance of standards
policies and procedures at the conceptual and logical design phases.
A. Database Administrator (DBA): This is more technically oriented role. DBA is
responsible for the physical realization of the database.
It is involved in physical design, implementation, security and integrity control
of the database.
… cont
1.3.3 Application Developers
Once the database has been implemented, the application programs that
provide the required functionality(retrieving data, inserting, updating, and
deleting data. ) for the end-users must be implemented. This is the
responsibility of the application developers.
1.3.4 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.
… cont
There are several categories of end users:
Casual end users:- occasionally access the database, but they may need
different information each time.
Naive or parametric end users: Their main job function revolves around
constantly querying and updating the database
Bank customers and tellers check account balances and post withdrawals and deposits.
Sophisticated end users include engineers, scientists, business analysts, and
others who thoroughly familiarize themselves with the facilities of the DBMS
in order to implement their own applications to meet their complex
requirements.
Standalone users maintain personal databases by using ready-made program
packages that provide easy-to-use menu-based or graphics-based interfaces.
These users become very proficient in using a specifics software package.
… cont
1.4 The ANSI/SPARC and Database Architecture
An early proposal for a standard terminology and general architecture for
database systems was produced in 1971 by DBTG.
The DBTG recognized the need for a two-level approach with a system view
called the schema and user views called subschemas.
The American National Standards Institute (ANSI) Standards Planning and
Requirements Committee (SPARC), or ANSI/SPARC, produced a similar
terminology and architecture in 1975 (ANSI, 1975).
recognized the need for a three-level approach with a system catalog.
aims to separate each users view of the database from the way the database
is physically represented
… cont
The purpose and origin of the Three-Level database architecture
All users should be able to access same data but have different customized
view of the data
Users should not need to know physical database storage details.
A user's view is unaffected or immune to changes made in other views
DBA should be able to change database storage structures without affecting
the users' views.
Internal structure of database should be unaffected by changes to physical
aspects of storage, such as change of hard disk
DBA should be able to change conceptual structure of database without
affecting all users.
… cont
The levels form a three-level architecture comprising an external, a
conceptual, and an internal level,
A. External level: The users‘ view of the database.
pertains to the specific data relevant to each user
includes only those entities, attributes, and relationships in the ‘real world‘
that the user is interested in.
Unrelated data may exist in the database, but users remain unaware of it.
In addition, different views may have different representations of the same
data.
… cont
B. Conceptual level: The community view of the database.
This level describes what data is stored in the database and the relationships
among the data.
This level contains the logical structure of the entire database as seen by the
DBA.
It is a complete view of the data requirements of the organization that is
independent of any storage considerations.
The conceptual level represents:
all entities, their attributes, and their relationships;
the constraints on the data;
Security and integrity information.
… cont
However, this level must not contain any storage-dependent details.
For instance, the description of an entity should contain only
Data Types of Attributes:
 Examples: Integer, Real, Character.
Attribute Length:
 Examples: Maximum number of digits or characters (e.g., 255 for strings).
Exclusions from Entity Description
Storage Considerations:
 Do not include details such as the number of bytes occupied.
… cont
C. Internal level: The physical representation of the database on the computer.
This level describes how the data is stored in the database.
The internal level covers the physical implementation of the database
It covers the data structures and file organizations used to store data on
storage devices.
The internal level is concerned with such things as:
storage space allocation for data and indexes;
record descriptions for storage (with stored sizes for data items);
record placement;
data compression and data encryption technique
… cont
… cont
1.5 Types of Database Systems
1.5.1 Client-Server Database System
In this architecture, a Client is a user machine which provides the user
interface.
Basically Server is a machine that provides services to the Client i.e. user
machine.
When any client requires additional functionality like database access, it can
connect to Server that is capable of providing the functionality needed by the
client.
… cont
… cont
Advantages of client server database system
Centralized Control
Ease of Maintenance
Scalability
Security
Response time and throughput is high.
A single database (on server) can be shared across several distinct client
(application) systems
Disadvantages of Client/Server Database System
Single Point of Failure: If the server goes down, all clients lose access
Network Dependency: Performance depends on network speed
… cont
1.5.2 Parallel Database System
consists of a multiple Central Processing Units (CPUs) and data storage disk in parallel.
Hence, they improve processing and Input/ Output (I/O) speeds.
Ideal for querying large databases and processing high transaction volumes per second
Advantages:
very useful for the applications that have to query extremely large databases or that have
to process an extremely large number of transactions per second.
the throughput and the response time are very high.
Performance: Enhanced performance for query processing and data retrieval by
distributing workloads across multiple processors.
Efficiency: Can handle large databases and complex queries more efficiently, reducing
response times.
Scalability: Can be scaled by simply adding more processors or storage units.
… cont
Disadvantages:
Complexity: More complex architecture and management as it involves
coordinating between multiple processors.
Cost: Higher costs for hardware and software to implement and maintain a
parallel system.
Data Consistency: Ensuring data consistency across parallel processes can be
challenging.
there is a startup cost associated with initiating a single process and the
startup-time may overshadow the actual processing time, affecting speedup
adversely.
… cont
1.5.3 Distributed Database System
A logically interrelated collection of shared data physically distributed over a
computer network is called as distributed database
the SW system that permits the management of the distributed database and
makes the distribution transparent to users is called as Distributed DBMS.
It consists of a single logical database that is split into a number of fragments.
Each fragment is stored on one or more computers under the control of a
separate DBMS, with the computers connected by a communications
network.
… cont
… cont
Advantages of Distributed Database System
provides greater efficiency and better performance.
A single database (on server) can be shared across several distinct client
(application) systems.
As data volumes and transaction rates increase, users can grow the system
incrementally.
It causes less impact on ongoing operations when adding new locations.
Distributed database system provides local autonomy.
Disadvantages of Distributed Database System
Recovery from failure is more complex in distributed database systems than
in centralized systems.
… cont
1.6 Database Management System (DBMS)
• A software system that enables users to define, create, maintain, and control
access to the database.
1.6.1 Components and Interfaces of DBMS
We can identify five major components in the DBMS environment: hardware,
software, data, procedures, and people
… cont
Hardware: The DBMS and the applications require hardware to run.
The hardware can range from a single personal computer to a single
mainframe or a network of computers.
The particular hardware depends on the organization‘s requirements and
the DBMS used.
Software:
The software component comprises
the DBMS software itself
and the application programs,
together with the operating system,
including network software if the DBMS is being used over a network.
… cont
Data: Perhaps the most important component of the DBMS environment
data acts as a bridge between the machine components and the human
components.
The database contains both the operational data and the metadata, the
data about data.
The structure of the database is called the schema.
… cont
Procedures refer to the instructions and rules that govern the design and use
of the database.
The users of the system and the staff who manage the database require
documented procedures on how to use or run the system.
These may consist of instructions on how to:
Log on to the DBMS
Use a particular DBMS facility or application program.
Start and stop the DBMS.
Make backup copies of the database.
Handle hardware or software failures.
… cont
People: The final component is the people involved with the system
There are four distinct types of people who participate in the DBMS
environment:
data and database administrators,
database designers,
application developers, and
end-users.
… cont
1.6.2 Functions of DBMS
Lists of different services that should be provided by any full-scale DBMS
a) Data storage, retrieval, and update:
b) A user-accessible catalog:
A system catalog, or data dictionary, is a repository of information
describing the data in the database: it is, the data about the data‘ or
metadata.
Typically, the system catalog stores:
names, types, and sizes of data items;
names of relationships;
integrity constraints on the data;
names of authorized users who have access to the data
… cont
c) Transaction support:
A DBMS must furnish a mechanism which will ensure either that all the
updates corresponding to a given transaction are made or that none of them
is made.
d) Concurrency control services:
A DBMS must furnish a mechanism to ensure that the database is updated
correctly when multiple users are updating the database concurrently.
e) Recovery services:
A DBMS must furnish a mechanism for recovering the database in the event
that the database is damaged in any way.
f) Authorization services:
A DBMS must furnish a mechanism to ensure that only authorized users can
access the database.
… cont
1.7 Data models and conceptual models
Data Model: a set of concepts to describe the structure of a database, and
certain constraints that the database should obey.
is a framework that represents how data is stored, organized, and
manipulated in a database.
Data model helps to understand the relationship between entities and to
create the most effective structure to hold data.
Data Model is a collection of tools or concepts for describing
Data
Data relationships
Data semantics
Data constraints
The main purpose of Data Model is to represent the data in an
understandable way.
… cont
1.7.1 Types of Data Model
Hierarchical Data Model
Network Data Model
Relational Data Model
… cont
Hierarchical Model
The simplest data model
Record type is referred to as node or segment
The top node is the root node
Nodes are arranged in a hierarchical structure as sort of upside-down tree
A parent node can have more than one child node
A child node can only have one parent node
The relationship between parent and child is one-to-many
Relation is established by creating physical link between stored records (each
is stored with a predefined access path to other records)
To add new record type or relationship, the database must be redefined and
then stored in a new form.
… cont
… cont
ADVANTAGES of Hierarchical Data Model:
is simple to construct and operate on
Corresponds to a number of natural hierarchically organized domains - e.g.,
geographical hierarchies (countries, states, cities) , personnel organization in
companies.
DISADVANTAGES of Hierarchical Data Model:
Navigational and procedural nature of processing
Little scope for "query optimization"
… cont
Network Model
 Allows record types to have more than one parent unlike hierarchical
model
A network data models sees records as set members
Each set has an owner and one or more members
Allow many to many relationship between entities
Like hierarchical model network model is a collection of physically linked
records.
Allow member records to have more than one owner
… cont
… cont
ADVANTAGES of Network Data Model:
Network Model is able to model complex relationships
DISADVANTAGES of Network Data Model:
Navigational and procedural nature of processing
Little scope for automated "query optimization”
… cont
3. Relational Data Model
Developed by Dr. Edgar Frank Codd in 1970
Viewed as a collection of tables called Relations equivalent to collection of
record types
Relation: Two dimensional table
Stores information or data in the form of tables
rows and columns
A row of the table is called tuple equivalent to record
A column of a table is called attribute equivalent to fields
Data value is the value of the Attribute
… cont
The related tables contain information that creates the relation
The tables seem to be independent but are related some how.
The rows represent records (collections of information about separate items)
The columns represent fields (particular attributes of a record)
A relational database conducts searches by using specified columns in one
table to find matching data in another table.
It matches information from a field in the first table with a corresponding
field in the second table, producing a third table that combines the requested
data from both tables.
Conceptual data models use concepts such as entities, attributes, and
relationships.
… cont
Database Languages
A database language consists of four parts:
Data Definition Language (DDL),
Data Manipulation Language (DML),
Transaction control language (TCL) and
Data control language (DCL).
… cont
A. The Data Definition Language (DDL)
used to define database structure or pattern.
It is used to create schema, tables, indexes, constraints, etc. in the database.
Using the DDL statements, you can create the skeleton of the database.
Data definition language is used to store the information of metadata like
the number of tables and schemas, their names, indexes, columns in each
table, constraints, etc.
Here are some tasks that come under DDL:
o Create: It is used to create objects in the database.
o Alter: It is used to alter the structure of the database.
o Drop: It is used to delete objects from the database.
o Rename: It is used to rename an object.
… cont
B. The Data Manipulation Language (DML)
It is a language that provides a set of operations to support the basic data
manipulation operations on the data held in the databases.
Data manipulation operations usually include the following:
insertion of new data into the database;
modification of data stored in the database;
retrieval of data contained in the database;
Deletion of data from the database.
… cont
C. Transaction Control language(TCL)
It used to manage transaction in database and the change made by data
manipulation language statements.
Transaction: the logical unit of work which consists of some operations to
control some tasks.
Example: COMMITE: used to permanently save any transaction into the
database. ROLLBACK: restore the database to last committee state.
D. Data Control Language (DCL)
It used to control access to data stored in database (Authorization)
Example: GRANT: allows specified users to perform specified tasks
REVOKE: cancel pervious granted or denied permission
DATABASE APPLICATIONS
Banking: all transactions
Airlines: reservations, schedules
Universities: registration, grades
Sales: customers, products, purchases
Online retailers: order tracking, customized recommendations
Manufacturing: production, inventory, orders, supply chain
Human resources: employee records, salaries, tax deductions

You might also like