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

Chapter 1

Uploaded by

yishaktumoregide
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views

Chapter 1

Uploaded by

yishaktumoregide
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 50

Jimma University

JiT, Faculty of Computing and Informatics


program: Information Science

Course Title: Advanced Database


Course Code: INSC2223

Instructor Name: Zerihun O.


Email: zrealworld43@gmail.com

Thursday, April 18, 2024


Chapter One

Database Systems Concepts


and Architecture
Chapter Outline
• DBMS
• Overview of Database and Data Models (ER, UML)
• Practical object-Oriented Database Design
Methodology
• Database System Architectures
• Database Languages and Query Languages
What is A Database?

 A database is a collection of related data.

 By data, we mean known facts that can be recorded and that have implicit
meaning.
 For example, consider the names, telephone numbers, and addresses of the people you
know.

 You may have recorded this data in an indexed address book or you may have stored
it on a hard drive, using a personal computer and software such as Microsoft Access
or Excel.
 This collection of related data with an implicit meaning is a database.
Database management system (DBMS)

 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:
o defining,

o constructing,

o manipulating, and

o Sharing databases among various users and applications.


Database management system (DBMS)
 Defining a database involves specifying the data types, structures, and
constraints of the data to be stored in the database.
 Constructing the database is the process of storing the data on some
storage medium that is controlled by the DBMS.
 Manipulating a database includes functions such as querying the database
to retrieve specific data, updating the database to reflect changes in the
mini-world, and generating reports from the data.
 Sharing a database allows multiple users and programs to access the
database simultaneously.
Components of DBMS
• Components of DBMS: There are the following components of
DBMS:
• Software
• Hardware
• Procedures
• Data
• Users
Continued…
Software
• The main component of a Database management system is the
software. It is the set of programs which is used to manage the
database and to control the overall computerized database.
• The DBMS software provides an easy-to-use interface to store,
retrieve, and update data in the database.
• This software component is capable of understanding the Database
Access Language and converts it into actual database commands to
execute or run them on the database.
Hardware
• This component of DBMS consists of a set of physical electronic
devices such as computers, I/O channels, storage devices, etc that
create an interface between computers and the users.
• This DBMS component is used for keeping and storing the data in
the database.
Continued…
Procedures
• Procedures refer to general rules and instructions that help to design the database
and to use a database management system.
• Procedures are used to setup and install a new database management system
(DBMS), to login and logout of DBMS software, to manage DBMS or application
programs, to take backup of the database, and to change the structure of the
database, etc.
Data
• It is the most important component of the database management system.
• The main task of DBMS is to process the data. Here, databases are defined,
constructed, and then data is stored, retrieved, and updated to and from the
databases.
• The database contains both the metadata (description about data or data about data)
and the actual (or operational) data.
Users
• The users are the people who control and manage the databases and perform
different types of operations on the databases in the database management system.
DBMS Functions
A DBMS performs several important functions that guarantee the
integrity and consistency of the data in the DB.
• Data dictionary management The DBMS stores definitions of
the data elements and their relationship in data dictionary.
• Data storage management The DBMS creates and manages the
complex structures required for data storage, thus relieving you
from the difficult task of defining and programming the physical
data characteristics.
• Data transformation and presentation The DBMS transforms
entered data to conform to required data structures
DBMS Functions continued…
• Security management The DBMS creates security system that
enforces user security and data privacy
• Multiuser access control To provide data integrity and data
consistency
• Backup and recovery management To ensure data safety and
integrity
• Data integrity management Enforces integrity rules, thus
minimizing data redundancy and maximizing data consistency
• DB access languages and application programming
interfaces
• DB communication interfaces Current-generation DBMS
accept end-user requests via multiple, different network
environments.
Figure 1.2: A simplified database system environment
Data Models
2. Object-Based Data Model- Object-oriented
programming (especially in Java, C++, or C#) has become
the dominant software-development methodology.
3. The object-relational data model- combines features
of the object-oriented data model and relational data
model.
4. Semi-structured Data Model- The semi-structured
data model permits the specification of data where
individual data items of the same type may have different
sets of attributes.
– The Extensible Markup Language (XML) is widely used to
represent semi-structured data.
Data Models
• Data Models Underlying the structure of a database is
the data model: a collection of conceptual tools for
describing data, data relationships, data semantics, and
consistency constraints.
– It provides a way to describe the design of a database at the
physical, logical, and view levels. The data models can be
classified into four different categories:
1. Relational Model- The relational model uses a
collection of tables to represent both data and the
relationships among those data.
– It is the most widely used data model, and a vast majority of
current database systems are based on the relational model.
Entity-Relationship Model.
Practical object-Oriented Database Design
Methodology
• The Database Design
and Implementation Process
• Use of UML Diagrams as an Aid to Database Design
Specification
Database System Life Cycle
• System definition-Defining scope of database system, its users and
applications
• Database Design-Logical and physical design of the database system on
the chosen DBMS
• Database implementation
– Specifying conceptual, external and internal database definitions
– Creating empty database files
– Implementing software applications
• Loading or data conversion-Populating the database
• Application conversion-Converting applications to the new system
• Testing and validation
• Operation-Running the new system
• Monitoring and maintenance-System maintenance and Performance
monitoring
The Database Design and Implementation
Process
• Design logical and physical structure of one or more databases
– Accommodate the information needs of the users in an organization for a
defined set of applications
• Goals of database design
– Very hard to accomplish and measure
• Often begins with informal and incomplete requirements
• Main phases of the overall database design and implementation
process:
– 1. Requirements collection and analysis
– 2. Conceptual database design
– 3. Choice of a DBMS
– 4. Data model mapping (also called logical database design)
– 5. Physical database design
– 6. Database system implementation and tuning
The Database Design and Implementation
Process
• Parallel activities
– Data content, structure, and constraints of the database
– Design of database applications
– Data-driven versus process-driven design
– Feedback loops among phases and within phases are common
• Heart of the database design process
– Conceptual database design (Phase 2)
– Data model mapping (Phase 4)
– Physical database design (Phase 5)
– Database system implementation and tuning (Phase 6)
Phase 1: Requirements Collection and Analysis
• Activities
– Identify application areas and user groups
– Study and analyze documentation
– Study current operating environment
– Collect written responses from users
• Requirements specification techniques
– Object-Oriented analysis (OOA)
– Data flow diagrams (DFDs)
– Refinement of application goals
– Computer-aided
Phase 2: Conceptual Database Design
• Phase 2a: Conceptual Schema Design
– Important to use a conceptual high-level data model
– Approaches to conceptual schema design
• Centralized (or one shot) schema design approach
• View integration approach
– Strategies for schema design
• Top-down strategy
• Bottom-up strategy
• Goal:-Complete understanding of the database structure,
semantics, interrelationships and constraints
• Serves as a stable description of the database contents
• Good understanding crucial for the users and designers
• Diagrammatic description serves as an excellent communication
tool
Approaches to Conceptual Schema Design

• Centralized Schema Design Approach


– Also known as one-shot approach
– Requirements of different applications and user groups are
merged into a single set of requirements and a single
schema is designed
– Time consuming, places the burden on DBA to reconcile
conflicts
• View Integration Approach
– Schema is designed for each user group or application
– These schemas are then merged into a global conceptual
schema during the view integration phase
– More practical
Schema Integration
• Identifying correspondence and conflict among different
schemas
– Naming conflicts
• Synonyms: The same concept but different names
– e.g. entity types CUSTOMER and CLIENT
• Homonyms: Different concepts but same name
– e.g. entity type PART as computer parts and furniture parts
– Type Conflicts: Representing the same concept by different
modeling constructs
• e.g. DEPARTMENT may be an entity type and an attribute
– Domain Conflicts: Attribute has different domains
• Also known as value set conflicts
• e.g. SSN as an integer and as a character string
– Conflict among constraints: Two schemas impose different
constraints
• e.g. different key of an entity type in different schemas
Schema Integration

• Modifying views to conform to one another


– Modifying schemas to conform to one another
• Merging of views
– Merging Schemas to create a global schema
– Specifying mappings between views and global schema
• Time consuming and difficult

• Restructuring
– Simplifying and restructuring to remove any redundancies
Phase 2b: Transaction Design
• In parallel with Phase 2a
– Specify transactions at a conceptual level
– Identify input/output and functional behavior
– Notation for specifying processes
• Design characteristics of known database transactions in a DBMS
• Types of Transactions
– Retrieval Transactions
• Used to retrieve data
– Update Transactions
• Update data
– Mixed Transactions
• Combination of update and retrieval
• Techniques for Specifying Transactions
– Input/output
– Functional Behavior
Desired Characteristics of Conceptual
Data Model
• Expressiveness
– Able to distinguish different types of data, relationships and
constraints
• Simplicity and Understandability
– Easy to understand
• Minimality
– Small number of distinct basic concepts
• Diagrammatic Representation
– Diagrammatic notation to represent conceptual schema
• Formality
– Formal unambiguous specification of data
Phase 3: Choice of a DBMS
• Costs to consider
– Software acquisition cost
– Maintenance cost
– Hardware acquisition cost
– Database creation and conversion cost
– Personnel cost
– Training cost
– Operating cost
• Consider DBMS portability among different types of hardware
Choice of DBMS
• Many factors to consider
– Technical Factors
• Type of DBMS: Relational, object-relational, object etc.
• Storage Structures
• Architectural options
– Economic Factors
• Acquisition, maintenance, training and operating costs
• Database creation and conversion cost
– Organizational Factors
• Organizational philosophy
– Relational or Object Oriented
– Vendor Preference
• Familiarity of staff with the system
• Availability of vendor services
Phase 4: Data Model Mapping (Logical Database Design)

• Create a conceptual schema and external schemas


– In data model of selected DBMS
• Transform the Schema from high-level data model into the
data model of the selected DBMS.
• Design of external schemas for specific applications
• Two stages
1. System-independent mapping
• DBMS independent mapping
2. Tailoring the schemas to a specific DBMS
• Adjusting the schemas obtained in step 1 to conform to the
specific implementation features of the data model used in the
selected DBMS
• Result
– DDL statements in the language of the chosen DBMS
Phase 5: Physical Database Design
• Choose specific file storage structures and access paths for the
database files
– Achieve good performance
• Design the specifications for the stored database in terms of physical
storage structures, record placements and indexes.
• Design Criteria
– Response Time
• Elapsed Time between submitting a database transaction for execution and
receiving a response
– Space Utilization
• Storage space used by database files and their access path structures
– Transaction throughput
• Average number of transactions/minute
• Must be measured under peak conditions
• Result
– Initial determination of storage structures and access paths for
database files
Phase 6: Database System Implementation and Tuning

• Typically responsibility of the DBA


– Compose DDL
– Load database
– Convert data from earlier systems
• Database programs implemented by application programmers
• Most systems include monitoring utility to collect
performance statistics
• During this phase database and application programs are implemented,
tested and deployed
• Database Tuning
– System and Performance Monitoring
– Data indexing
– Reorganization
• Tuning is a continuous process
Database Design Tools
• Common Features
– Allow the designer to draw conceptual schema diagram in some tool-
specific notation
– Allow model mapping
– Allow some level of design normalization
• Problems
– Most tools do nothing more than representing relationships among
tables
– Most tools lack built-in methodology support
– Most tools have poor design verification system
Characteristics of a Good Design Tool
• Easy-to-use interface
– Easy to use
– Customizable
• Analytical components
– For difficult tasks
• such as evaluating physical design alternatives or detecting conflicting
constraints among views
• Heuristic components
– Automating design process using heuristic rules
• Trade-off analysis
– Comparative analysis in case of multiple alternatives
– At least at the conceptual design level
• Display of design results
– Displaying results in simple and easy to understand form
• Design Verification
– Verifying that the resulting design satisfies the initial requirements
Use of UML Diagrams as an Aid to Database
Design Specification
• Use UML as a design specification standard
• Unified Modeling Language (UML) approach
– Combines commonly accepted concepts from many object-
oriented (O-O) methods and methodologies
– Includes use case diagrams, sequence diagrams, and state-
chart diagrams
UML for Database Application Design
• Advantages of UML
– Resulting models can be used to design relational, object-oriented, or
object-relational databases
– Brings traditional database modelers, analysts, and designers together
with software application developers
Different Types of Diagrams in UML
• Structural diagrams
– Class diagrams and package diagrams
– Object diagrams
– Component diagrams
– Deployment diagrams
• Behavioral diagrams
– Use case diagrams
– Sequence diagrams
– Collaboration diagrams
– State-chart diagrams
– Activity diagrams
Modeling and Design Example: UNIVERSITY
Database
Database System Architectures
• Centralized
• Client-Server Systems
• Server System Architectures
• Parallel Systems
• Distributed Systems
Centralized Systems
• Run on a single computer system and do not interact with
other computer systems.
• General-purpose computer system: one to a few CPUs and a
number of device controllers that are connected through a
common bus that provides access to shared memory.
• Single-user system (e.g., personal computer or workstation):
desk-top unit, single user, usually has only one CPU and one or
two hard disks; the OS may support only one user.
• Multi-user system: more disks, more memory, multiple CPUs,
and a multi-user OS. Serve a large number of users who are
connected to the system vie terminals. Often called server
systems.
A Centralized Computer System
Client-Server Systems
• Server systems satisfy requests generated at m client systems,
whose general structure is shown below:

• Advantages of replacing mainframes with networks of


workstations or personal computers connected to back-end
server machines:
– better functionality for the cost
– flexibility in locating resources and expanding facilities
– better user interfaces
– easier maintenance
Client-Server Systems (Cont.)
• Database functionality can be divided into:
– Back-end: manages access structures, query evaluation and
optimization, concurrency control and recovery.
– Front-end: consists of tools such as forms, report-writers, and
graphical user interface facilities.
• The interface between the front-end and the back-end is
through SQL or through an application program interface.
Server System Architecture
• Server systems can be broadly categorized into
two kinds:
– transaction servers which are widely used in
relational database systems, and
– data servers, used in object-oriented database
systems
Parallel Systems
• Parallel database systems consist of multiple processors and multiple
disks connected by a fast interconnection network.
• A coarse-grain parallel machine consists of a small number of powerful
processors
• A massively parallel or fine grain parallel machine utilizes thousands of
smaller processors.
• Two main performance measures:
– throughput --- the number of tasks that can be completed in a given time
interval
– response time --- the amount of time it takes to complete a single task from the
time it is submitted
Types of Parallel systems
• Shared memory -- processors share a common memory
• Shared disk -- processors share a common disk
• Shared nothing -- processors share neither a common memory nor
common disk
• Hierarchical -- hybrid of the above architectures
Distributed Systems
• Data spread over multiple machines (also referred to as
sites or nodes).
• Network interconnects the machines
• Data shared by users on multiple machines
Distributed Databases
• Homogeneous distributed databases
– Same software/schema on all sites, data may be partitioned among
sites
– Goal: provide a view of a single database, hiding details of
distribution
• Heterogeneous distributed databases
– Different software/schema on different sites
– Goal: integrate existing databases to provide useful functionality
• Differentiate between local and global transactions
– A local transaction accesses data in the single site at which the
transaction was initiated.
– A global transaction either accesses data in a site different from the
one at which the transaction was initiated or accesses data in several
different sites.
DBMS Languages
A database system provides a
• data-definition language:- Language to specify conceptual and
internal schemas for the database and any mappings between the two.
It specifies the database schema and a data-manipulation language to
express database queries and updates.
– In practice, the data definition and data-manipulation languages are
not two separate languages; instead they simply form parts of a
single database language, such as the widely used SQL language.
• Data-Manipulation Language: is a language that enables users to
access or manipulate data as organized by the appropriate data model.
It is used for retrieval, insertion, deletion, and modification of the data.
There are two main types of DMLs:
– A high-level or nonprocedural DML : specify complex DB operations.
Example SQL(set-at-a-time)
– A low-level or procedural DML: retrieve individual records or objects
from DB and process each separately (record-at-a-time).
DBMS Languages continued…
• SQL relational database language: represents a combination of
DDL, VDL, and DML, as well as statements for constraint
specification and schema evolution
• Storage definition language SDL: used when clear distinction
between conceptual and internal schema.
• view definition language VDL: specify user views and their
mappings to the conceptual schema.
• DCL (Data Control language) which is used to control the
transaction and concurrency of database. There are two main
functions:
– Grant privileges
– Revoke privileges
Thank You!

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy