SlideShare a Scribd company logo
1 of 55
Download to read offline
Fundamentals of Database
System
Chapter Two:
Database System Concepts
and
Architecture
Prepared by:
Misganaw Abeje
University of Gondar
College Of Informatics
Department of computer science
Misganaw.Abeje13@gmail.com
Outline
– Data Model
– Database modeling and its usage
– Major data models evolved
– Schemas and a database state
– The Three-Schema Architecture
– Data Independence
– Database languages
– DBMS Interfaces
BY: MA
Data Model
 One fundamental characteristic of the database approach
is that it provides some level of data abstraction.
 Data abstraction generally refers to the suppression of
details of data organization and storage, and the
highlighting of the essential features for an improved
understanding of data.
 One of the main characteristics of the database approach
is to support data abstraction so that different users can
perceive data at their preferred level of detail.
 The data model is a collection of concepts that can be
used to describe the structure of a database, provides
BY: MA
 Most data models also include a set of basic operations for
specifying retrievals and updates on the database.
 In addition to the basic operations provided by the data model,
it is becoming more common to include concepts in the data
model to specify the dynamic aspect or behavior of a
database application. This allows the database designer to
specify a set of valid user-defined operations that are allowed
on the database objects.
 An example of a user-defined operation could be
COMPUTE_GPA, which can be applied to a STUDENT object.
BY: MA
Categories of Data Models
 Many data models have been proposed, which we can
categorize according to the types of concepts they use to
describe the database structure.
 High-level or conceptual data models provide concepts
that are close to the way many users perceive data,
 whereas low-level or physical data models provide
concepts that describe the details of how data is stored
on the computer storage media, typically magnetic disks.
 Concepts provided by low-level data models are
generally meant for computer specialists, not for end
users.
BY: MA
 Between these two extremes is a class of representational
(or implementation) data models, which provide concepts
that may be easily understood by end users but that are not
too far removed from the way data is organized in computer
storage.
 Representational data models hide many details of data
storage on disk but can be implemented on a computer
system directly.
 Concepts are defined as abstract ideas, they are
understood to be the fundamental building block of the
database such as entities, attributes, and relationships.
BY: MA
 An entity represents a real-world object or concept, such
as an employee or a project from the mini-world that is
described in the database.
 An attribute represents some property of interest that
further describes an entity, such as the employee’s name
or salary.
 A relationship among two or more entities represents an
association among the entities, for example, a works-on
relationship between an employee and a project. Chapter
3 presents the Entity-Relationship model—a popular
high-level conceptual data model.
BY: MA
The Importance of Data Models
 Designers, programmers, and end users see data in
different ways(Different views of same data ). Therefore
data model provides Various degrees of data abstraction
help reconcile varying views of same data.
 Data modeling reduces complexities of database design.
 Data models Relatively simple representations of complex
real-world data structures Often graphical
 An abstraction of a real-world object or event which is
Useful in understanding complexities of the real-world
environment.
 Data modeling is iterative and progressive
BY: MA
 Facilitate interaction among the designer, the
applications programmer, and the end user
 End users have different views and needs for data,
which is data model support multiple view of database.
 Data model organizes data for various users.
 Data model is an abstraction: Cannot draw required data
out of the data model .
BY: MA
Types of Data Model
 Representational or implementation data models are the
models used most frequently in traditional commercial
DBMSs. These include the
 The network and hierarchical models that have been
widely used in the past.
 Relational data model, widely used as well as the so-
called legacy data models
 Object data model as an example of a new family of
higher-level implementation data models that are closer
to conceptual data models.
BY: MA
BY: MA
The Hierarchical Model
 Developed in the 1960s to manage large amounts of data
for manufacturing projects
 Hierarchical Database Model in which data is stored in
the form of records and organized into a tree-like structure,
or parent-child structure, in which in parent node can have
many child nodes connected through links.
 Hierarchical structure contains levels or segments or
children's/leaf
– Segment analogous to a record type
– Set of one-to-many relationships between segments
BY: MA
BY: MA
Cont..
 Advantage of Hierarchical Database Model are:
– conceptual Simplicity
– Database Security
– Data Independence
– Data integrity
 Disadvantage of Hierarchical Database Model are:
– Complex implementation
– Difficult to manage
– Is not define many-one and many-many relationship
– Lacks of standard
– Implementation programming and use Complexity
BY: MA
The Network Model
 Created to represent complex data relationships more
effectively.
– Improves database performance.
– Imposes a database standard
 The network database model is a model for modeling the
entities in such a way that one child entity can have more
than one parent entity. In 1969, the network model was
presented by Charles Bachman.
 Conference on Data Systems Languages (CODASYL)
created the DBTG, Database Task Group (DBTG):
defined environment to facilitate database creation.
BY: MA
Characteristics of Network Model
 The network model is better than a hierarchical model.
 Supports many to many relationships.
 Entities are represented as a connected network with each other.
 One child entity can have more than one parent entity. For example,
in the figure, the Subject has two children. One child is a STUDENT
and another one is Degree.
 Entities can have multiple parent entities and lead to a complex
structure.
 Not very flexible to reorganize the model.
 High performance than hierarchical model
 Query facility is not available in the network model.
BY: MA
BY: MA
The Relational Model
 Developed by E. F. Codd (IBM) in 1970
 Table (relations)
– Matrix consisting of row/column intersections
– Each row in a relation called a tuple
 Relational models considered impractical in
1970
 Model conceptually simple at expense of
computer overhead
BY: MA
 Relational data management system (RDBMS)
– Performs same functions provided by
hierarchical model
– Hides complexity from the user
 Relational diagram (ER Diagram)
– Representation of entities, attributes, and
relationships
 Relational table stores collection of related entities
BY: MA
BY: MA
BY: MA
Cont…
 SQL-based relational database application
involves three parts:
– User interface
 Allows end user to interact with the data
– Set of tables stored in the database
 Each table is independent from another
 Rows in different tables related based on
common values in common attributes
– SQL “engine”
 Executes all queries
BY: MA
The Entity Relationship Model
 Widely accepted standard for data modeling to
represent.
 Graphical representation of entities and their
relationships in a database structure
 Entity relationship diagram (ERD)
– Uses graphic representations to model
database components
– Entity is mapped to a relational table
BY: MA
Cont…
 Entity instance (or occurrence) is row in table
 Entity set is collection of like entities
 Connectivity labels types of relationships
 Relationships expressed using Chen notation
– Relationships represented by a diamond
– Relationship name written inside the diamond
BY: MA
The Object-Oriented (OO) Model
 Data and relationships contained in single
structure known as an object
 OODM (object-oriented data model) is the
basis for OODBMS
– Semantic data model
 Objects contain operations
 Object is self-contained: a basic building block
for autonomous structures
 Object is an abstraction of a real-world entity
BY: MA
Cont..
 Attributes describe the properties of an object
 Objects that share similar characteristics are
grouped in classes
 Classes are organized in a class hierarchy
 Inheritance: object inherits methods and
attributes of parent class
 UML based on OO concepts that describe
diagrams and symbols
– Used to graphically model a system
BY: MA
Data Models: A Summary
 Common characteristics:
– Conceptual simplicity with semantic completeness
– Represent the real world as closely as possible
– Real-world transformations must conform with
consistency and integrity characteristics
 Each new data model capitalized on the
shortcomings of previous models
 Some models better suited for some tasks
BY: MA
BY: MA
Schemas, Instances, and Database State
 In any data model, it is important to distinguish between
the description of the database and the database itself.
The description of a database is called the database
schema, which is specified during database design and
is not expected to change frequently.
 Database Schemas is the structure of a database we
mean data types, relationships, and constraints that
hold a database.
 Schemas is important to distinguish between the
description of the database and the database itself.
 The actual data in a database may change quite
BY: MA
 A displayed schema is called a schema diagram. Figure 2.1
shows a schema diagram for the database shown in Figure
1.2; the diagram displays the structure of each record type but
not the actual instances of records. We call each object in the
schema such as STUDENT or COURSE a schema construct.
 A schema diagram displays only some aspects of a schema,
such as the names of record types and data items, and some
types of constraints. The actual data in a database may change
quite frequently.
 The data in the database at a particular moment in time is
called a database state or snapshot. It is also called the
current set of occurrences or instances in the database.
BY: MA
schema diagram
BY: MA
Three-Schema Architecture
and Data Independence
 The most important characteristics of the database
approach, listed in chapter 1, some of are:
1. Use of a catalog to store the database description (schema) so
as to make it self-describing,
2. Insulation of programs and data (program-data and
program-operation independence),(data Independence)
3. support of multiple user views.
1. In this section we specify an architecture for database
systems, called the three-schema architecture, that
was proposed to help achieve and visualize these
characteristics.
BY: MA
The Three-Schema Architecture
 The goal of the three-schema architecture, illustrated in Figure
2.2, is to separate the user applications from the physical
database which is Degrees/level of Data Abstraction.
 The three-schema architecture is a convenient tool with which
the user can visualize the schema levels in a database system.
 A complete database is much too complex a system to be
developed without first creating a simplified framework.
 Data abstraction makes it possible for the developer to start
from essential elements. data abstractions and incrementally
add data detail to create the final system.
 Database designer starts with abstracted view, then adds details
BY: MA
 Standards Planning and Requirements Committee
(SPARC) Defined a framework for data modeling based
on degrees of data abstraction1970s): which is in three
tier architecture, schemas can be defined at the following
three levels
 External
 Conceptual
 Internal
BY: MA
BY: MA
1. The external or view level
 The external or view level includes a number of external
schemas or user views.
 Each external schema describes the part of the database
that a particular user group is interested in and hides the
rest of the database from that user group.
– End users’ view of the data environment
– ER diagrams represent external views
– External schema: specific representation of
an external view of Entities, Relationships,
Processes, Constraints.
BY: MA
Cont…
 Easy to identify specific data required to support
each business unit’s operations.
 Facilitates designer’s job by providing feedback
about the model’s adequacy.
 Ensures security constraints in database design.
 Simplifies application program development
BY: MA
BY: MA
The Conceptual Model
 The conceptual level has a conceptual schema, which
describes the structure of the whole database for a
community of users. The conceptual schema hides the
details of physical storage structures and concentrates on
describing entities, data types, relationships, user
operations, and constraints.
 Represents global view of the entire database
 All external views integrated into single global
view: conceptual schema
 Complete ER model most widely used
 ERD graphically represents the conceptual schema diagram
BY: MA
BY: MA
 Provides a relatively easily understood worldwide level
view of data environment
 Independent of both software and hardware
– Does not depend on the DBMS software used to
implement the model
– Does not depend on the hardware used in the
implementation of the model
– Changes in hardware or software do not affect
database design at the conceptual level
BY: MA
The Internal Model
 The internal level has an internal schema, which describes
the physical storage structure of the database. The internal
schema uses a physical data model and describes the
complete details of data storage and access paths for the
database.
 Representation of the database as “seen” by the DBMS, Maps
the conceptual model to the DBMS
 Internal schema depicts a specific representation of an internal
model.
 Depends on specific database software, Change in DBMS
software requires internal model be changed
 Logical independence: change internal model without affecting
BY: MA
BY: MA
The Physical Model
 Operates at lowest level of abstraction
– Describes the way data are saved on storage
media such as disks or tapes.
 Requires the definition of physical storage
and data access methods.
 Relational model aimed at logical level.
– Does not require physical-level details.
 Physical independence: changes in physical
model do not affect internal model
BY: MA
BY: MA
Data Independence
 The three-schema architecture can be used to further
explain the concept of data independence, which can be
defined as the capacity to change the schema at one
level of a database system without having to change the
schema at the next higher level. We can define two types
of data independence:
 Logical Data Independence Capacity to change the
conceptual schema without changing the application
programs or external schema.
 Physical data independence Capacity to change the
internal schema without changing the conceptual
schema.
BY: MA
DBMS Languages
 Once the design of a database is completed and a DBMS
is chosen to implement the database, the first step is to
specify conceptual and internal schemas for the database
 These SQL commands are mainly categorized into four
categories as:
– DDL – Data Definition Language: Used by DBA and
Database designers to define both conceptual and
internal schemas.
– DQl – Data Query Language: DML statements are
used for performing queries on the data within schema
objects. The purpose of DQL Command is to get some
BY: MA
 The main types of languages and interfaces that DBMSs
support.
– A data definition language (DDL) is used to define the database
conceptual schema. In most DBMSs, the DDL also defines user
views and, sometimes, storage structures; The DBMS compiles all
schema definitions and stores their descriptions in the DBMS
catalog.
– A data manipulation language (DML) is used for specifying
database retrievals and updates. DMLs can be high level (set-
oriented, nonprocedural) or low level (record oriented,
procedural). A high-level DML can be embedded in a host
programming language, or it can be used as a standalone
language; in the latter case it is often called a query language.
BY: MA
DBMS Interfaces
 User-friendly interfaces provided by a DBMS may include the following:
1. Menu-Based Interfaces for Web Clients or Browsing. These
interfaces present the user with lists of options (called menus) that
lead the user through the formulation of a request. Menu based
Interfaces. Pull-down menus are a very popular technique in Web-
based user interfaces. They are also often used in browsing
interfaces, which allow a user to look through the contents of a
database in an exploratory and unstructured manner.
2. Forms-Based Interfaces. A forms-based interface displays a form
to each user. Users can fill out all of the form entries to insert new
data, or they can fill out only certain entries, in which case the
DBMS will retrieve matching data for the remaining entries. Forms
are usually designed and programmed for naive users as interfaces
to canned transactions.
BY: MA
3. Graphical User Interfaces: A GUI typically displays a
schema to the user in diagrammatic form. The user then
can specify a query by manipulating the diagram. In
many cases, GUIs utilize both menus and forms. Most
GUIs use a pointing device, such as a mouse, to select
certain parts of the displayed schema diagram.
4. Interfaces for the DBA: Most database systems contain
privileged commands that can be used only by the DBA
staff. These include commands for creating accounts,
setting system parameters, granting account
authorization, changing a schema, and reorganizing the
storage structures of a database.
BY: MA
The Database System Environment: Database System
Utilities
 In addition to possessing the software modules just
described, most DBMSs have database utilities that
help the DBA manage the database system. Common
utilities have the following types of functions:
– Loading. A loading utility is used to load existing data files such
as text files or sequential files into the database. Usually, the
current (source) format of the data file and the desired (target)
database file structure are specified to the utility, which then
automatically reformats the data and stores it in the database.
– Backup. A backup utility creates a backup copy of the database,
usually by dumping the entire database onto tape or other mass
storage medium. The backup copy can be used to restore the
database in case of catastrophic disk failure. Incremental
BY: MA
 Database storage reorganization. This utility can be
used to reorganize a set of database files into different
file organizations, and create new access paths to
improve performance.
 Performance monitoring. Such a utility monitors
database usage and provides statistics to the DBA. The
DBA uses the statistics in making decisions such as
whether or not to reorganize files or whether to add or
drop indexes to improve performance.
BY: MA
DBMS Classification
 The typical and popular DBMS are ORACLE, SQL
SERVER, MySQL SERVER, PostgreSQL , SQLite…..
 We classified DBMSs according to several criteria:
– Data model: The main data model used in many current
commercial DBMSs is the relational data model.
– The number of users supported by the system. Single-
user systems support only one user at a time and are
mostly used with PCs. Multiuser systems, which
include the majority of DBMSs, support concurrent
multiple users.
BY: MA
 The third criterion is the number of sites over which the
database is distributed. A DBMS is centralized if the data is
stored at a single computer site. A centralized DBMS can
support multiple users, but the DBMS and the database reside
totally at a single computer site. A distributed DBMS
(DDBMS) can have the actual database and DBMS software
distributed over many sites, connected by a computer network.
 The fourth criterion is cost. It is difficult to propose a
classification of DBMSs based on cost. Today we have open
source (free) DBMS products like MySQL and
PostgreSQL that are supported by third-party vendors with
additional services.
BY: MA
 Thank you
BY: MA

More Related Content

What's hot

Fundamentals of Database system
Fundamentals of Database systemFundamentals of Database system
Fundamentals of Database systemphilipsinter
 
Assignment on dbms
Assignment on dbmsAssignment on dbms
Assignment on dbmsMohd Arif
 
Lecture 06 relational algebra and calculus
Lecture 06 relational algebra and calculusLecture 06 relational algebra and calculus
Lecture 06 relational algebra and calculusemailharmeet
 
Data Models In Database Management System
Data Models In Database Management SystemData Models In Database Management System
Data Models In Database Management SystemAmad Ahmad
 
ER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMSER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMSssuser20b618
 
Database backup and recovery
Database backup and recoveryDatabase backup and recovery
Database backup and recoveryAnne Lee
 
Introduction to DBMS(For College Seminars)
Introduction to DBMS(For College Seminars)Introduction to DBMS(For College Seminars)
Introduction to DBMS(For College Seminars)Naman Joshi
 
ER-MODEL WITH DBMS.pptx
ER-MODEL WITH DBMS.pptxER-MODEL WITH DBMS.pptx
ER-MODEL WITH DBMS.pptxKomal Komal
 
Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01Jotham Gadot
 
Database systems - Chapter 2
Database systems - Chapter 2Database systems - Chapter 2
Database systems - Chapter 2shahab3
 
Sql Authorization
Sql AuthorizationSql Authorization
Sql AuthorizationFhuy
 
Database Design and Normalization Techniques
Database Design and Normalization TechniquesDatabase Design and Normalization Techniques
Database Design and Normalization TechniquesNishant Munjal
 

What's hot (20)

Entity relationship modelling
Entity relationship modellingEntity relationship modelling
Entity relationship modelling
 
Fundamentals of Database system
Fundamentals of Database systemFundamentals of Database system
Fundamentals of Database system
 
Assignment on dbms
Assignment on dbmsAssignment on dbms
Assignment on dbms
 
Er diagram
Er diagramEr diagram
Er diagram
 
Lecture 06 relational algebra and calculus
Lecture 06 relational algebra and calculusLecture 06 relational algebra and calculus
Lecture 06 relational algebra and calculus
 
ER model
ER modelER model
ER model
 
ER Model in DBMS
ER Model in DBMSER Model in DBMS
ER Model in DBMS
 
Basic DBMS ppt
Basic DBMS pptBasic DBMS ppt
Basic DBMS ppt
 
Database systems introduction
Database systems introductionDatabase systems introduction
Database systems introduction
 
Data Models In Database Management System
Data Models In Database Management SystemData Models In Database Management System
Data Models In Database Management System
 
Dbms notes
Dbms notesDbms notes
Dbms notes
 
ER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMSER DIAGRAM & ER MODELING IN DBMS
ER DIAGRAM & ER MODELING IN DBMS
 
Database backup and recovery
Database backup and recoveryDatabase backup and recovery
Database backup and recovery
 
Introduction to DBMS(For College Seminars)
Introduction to DBMS(For College Seminars)Introduction to DBMS(For College Seminars)
Introduction to DBMS(For College Seminars)
 
ER-MODEL WITH DBMS.pptx
ER-MODEL WITH DBMS.pptxER-MODEL WITH DBMS.pptx
ER-MODEL WITH DBMS.pptx
 
Database Chapter 2
Database Chapter 2Database Chapter 2
Database Chapter 2
 
Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01Fundamentals of Database ppt ch01
Fundamentals of Database ppt ch01
 
Database systems - Chapter 2
Database systems - Chapter 2Database systems - Chapter 2
Database systems - Chapter 2
 
Sql Authorization
Sql AuthorizationSql Authorization
Sql Authorization
 
Database Design and Normalization Techniques
Database Design and Normalization TechniquesDatabase Design and Normalization Techniques
Database Design and Normalization Techniques
 

Similar to chapter 2-DATABASE SYSTEM CONCEPTS AND architecture [Autosaved].pdf

Similar to chapter 2-DATABASE SYSTEM CONCEPTS AND architecture [Autosaved].pdf (20)

Student POST  Database processing models showcase the logical s.docx
Student POST  Database processing models showcase the logical s.docxStudent POST  Database processing models showcase the logical s.docx
Student POST  Database processing models showcase the logical s.docx
 
DBMS Part 1.pptx
DBMS Part 1.pptxDBMS Part 1.pptx
DBMS Part 1.pptx
 
View of data DBMS
View of data DBMSView of data DBMS
View of data DBMS
 
Database Management Systems.ppt
Database Management Systems.pptDatabase Management Systems.ppt
Database Management Systems.ppt
 
Database System Concepts AND architecture [Autosaved].pptx
Database System Concepts AND architecture [Autosaved].pptxDatabase System Concepts AND architecture [Autosaved].pptx
Database System Concepts AND architecture [Autosaved].pptx
 
2. Chapter Two.pdf
2. Chapter Two.pdf2. Chapter Two.pdf
2. Chapter Two.pdf
 
DBMS
DBMSDBMS
DBMS
 
DBMS-Unit-1.pptx
DBMS-Unit-1.pptxDBMS-Unit-1.pptx
DBMS-Unit-1.pptx
 
Database Concepts & SQL(1).pdf
Database Concepts & SQL(1).pdfDatabase Concepts & SQL(1).pdf
Database Concepts & SQL(1).pdf
 
Dbms Lec Uog 02
Dbms Lec Uog 02Dbms Lec Uog 02
Dbms Lec Uog 02
 
Dbms unit i
Dbms unit iDbms unit i
Dbms unit i
 
DBMS.ppt
DBMS.pptDBMS.ppt
DBMS.ppt
 
Unit 1 DBMS
Unit 1 DBMSUnit 1 DBMS
Unit 1 DBMS
 
Data models
Data modelsData models
Data models
 
Data models
Data modelsData models
Data models
 
Data models
Data modelsData models
Data models
 
Unit 1.2.pptx
Unit 1.2.pptxUnit 1.2.pptx
Unit 1.2.pptx
 
Data Models.ppt
Data Models.pptData Models.ppt
Data Models.ppt
 
Data Modeling.docx
Data Modeling.docxData Modeling.docx
Data Modeling.docx
 
csedatabasemanagementsystemppt-170825044344.pdf
csedatabasemanagementsystemppt-170825044344.pdfcsedatabasemanagementsystemppt-170825044344.pdf
csedatabasemanagementsystemppt-170825044344.pdf
 

Recently uploaded

Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 

Recently uploaded (20)

Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 

chapter 2-DATABASE SYSTEM CONCEPTS AND architecture [Autosaved].pdf

  • 1. Fundamentals of Database System Chapter Two: Database System Concepts and Architecture Prepared by: Misganaw Abeje University of Gondar College Of Informatics Department of computer science Misganaw.Abeje13@gmail.com
  • 2. Outline – Data Model – Database modeling and its usage – Major data models evolved – Schemas and a database state – The Three-Schema Architecture – Data Independence – Database languages – DBMS Interfaces BY: MA
  • 3. Data Model  One fundamental characteristic of the database approach is that it provides some level of data abstraction.  Data abstraction generally refers to the suppression of details of data organization and storage, and the highlighting of the essential features for an improved understanding of data.  One of the main characteristics of the database approach is to support data abstraction so that different users can perceive data at their preferred level of detail.  The data model is a collection of concepts that can be used to describe the structure of a database, provides BY: MA
  • 4.  Most data models also include a set of basic operations for specifying retrievals and updates on the database.  In addition to the basic operations provided by the data model, it is becoming more common to include concepts in the data model to specify the dynamic aspect or behavior of a database application. This allows the database designer to specify a set of valid user-defined operations that are allowed on the database objects.  An example of a user-defined operation could be COMPUTE_GPA, which can be applied to a STUDENT object. BY: MA
  • 5. Categories of Data Models  Many data models have been proposed, which we can categorize according to the types of concepts they use to describe the database structure.  High-level or conceptual data models provide concepts that are close to the way many users perceive data,  whereas low-level or physical data models provide concepts that describe the details of how data is stored on the computer storage media, typically magnetic disks.  Concepts provided by low-level data models are generally meant for computer specialists, not for end users. BY: MA
  • 6.  Between these two extremes is a class of representational (or implementation) data models, which provide concepts that may be easily understood by end users but that are not too far removed from the way data is organized in computer storage.  Representational data models hide many details of data storage on disk but can be implemented on a computer system directly.  Concepts are defined as abstract ideas, they are understood to be the fundamental building block of the database such as entities, attributes, and relationships. BY: MA
  • 7.  An entity represents a real-world object or concept, such as an employee or a project from the mini-world that is described in the database.  An attribute represents some property of interest that further describes an entity, such as the employee’s name or salary.  A relationship among two or more entities represents an association among the entities, for example, a works-on relationship between an employee and a project. Chapter 3 presents the Entity-Relationship model—a popular high-level conceptual data model. BY: MA
  • 8. The Importance of Data Models  Designers, programmers, and end users see data in different ways(Different views of same data ). Therefore data model provides Various degrees of data abstraction help reconcile varying views of same data.  Data modeling reduces complexities of database design.  Data models Relatively simple representations of complex real-world data structures Often graphical  An abstraction of a real-world object or event which is Useful in understanding complexities of the real-world environment.  Data modeling is iterative and progressive BY: MA
  • 9.  Facilitate interaction among the designer, the applications programmer, and the end user  End users have different views and needs for data, which is data model support multiple view of database.  Data model organizes data for various users.  Data model is an abstraction: Cannot draw required data out of the data model . BY: MA
  • 10. Types of Data Model  Representational or implementation data models are the models used most frequently in traditional commercial DBMSs. These include the  The network and hierarchical models that have been widely used in the past.  Relational data model, widely used as well as the so- called legacy data models  Object data model as an example of a new family of higher-level implementation data models that are closer to conceptual data models. BY: MA
  • 12. The Hierarchical Model  Developed in the 1960s to manage large amounts of data for manufacturing projects  Hierarchical Database Model in which data is stored in the form of records and organized into a tree-like structure, or parent-child structure, in which in parent node can have many child nodes connected through links.  Hierarchical structure contains levels or segments or children's/leaf – Segment analogous to a record type – Set of one-to-many relationships between segments BY: MA
  • 14. Cont..  Advantage of Hierarchical Database Model are: – conceptual Simplicity – Database Security – Data Independence – Data integrity  Disadvantage of Hierarchical Database Model are: – Complex implementation – Difficult to manage – Is not define many-one and many-many relationship – Lacks of standard – Implementation programming and use Complexity BY: MA
  • 15. The Network Model  Created to represent complex data relationships more effectively. – Improves database performance. – Imposes a database standard  The network database model is a model for modeling the entities in such a way that one child entity can have more than one parent entity. In 1969, the network model was presented by Charles Bachman.  Conference on Data Systems Languages (CODASYL) created the DBTG, Database Task Group (DBTG): defined environment to facilitate database creation. BY: MA
  • 16. Characteristics of Network Model  The network model is better than a hierarchical model.  Supports many to many relationships.  Entities are represented as a connected network with each other.  One child entity can have more than one parent entity. For example, in the figure, the Subject has two children. One child is a STUDENT and another one is Degree.  Entities can have multiple parent entities and lead to a complex structure.  Not very flexible to reorganize the model.  High performance than hierarchical model  Query facility is not available in the network model. BY: MA
  • 18. The Relational Model  Developed by E. F. Codd (IBM) in 1970  Table (relations) – Matrix consisting of row/column intersections – Each row in a relation called a tuple  Relational models considered impractical in 1970  Model conceptually simple at expense of computer overhead BY: MA
  • 19.  Relational data management system (RDBMS) – Performs same functions provided by hierarchical model – Hides complexity from the user  Relational diagram (ER Diagram) – Representation of entities, attributes, and relationships  Relational table stores collection of related entities BY: MA
  • 22. Cont…  SQL-based relational database application involves three parts: – User interface  Allows end user to interact with the data – Set of tables stored in the database  Each table is independent from another  Rows in different tables related based on common values in common attributes – SQL “engine”  Executes all queries BY: MA
  • 23. The Entity Relationship Model  Widely accepted standard for data modeling to represent.  Graphical representation of entities and their relationships in a database structure  Entity relationship diagram (ERD) – Uses graphic representations to model database components – Entity is mapped to a relational table BY: MA
  • 24. Cont…  Entity instance (or occurrence) is row in table  Entity set is collection of like entities  Connectivity labels types of relationships  Relationships expressed using Chen notation – Relationships represented by a diamond – Relationship name written inside the diamond BY: MA
  • 25. The Object-Oriented (OO) Model  Data and relationships contained in single structure known as an object  OODM (object-oriented data model) is the basis for OODBMS – Semantic data model  Objects contain operations  Object is self-contained: a basic building block for autonomous structures  Object is an abstraction of a real-world entity BY: MA
  • 26. Cont..  Attributes describe the properties of an object  Objects that share similar characteristics are grouped in classes  Classes are organized in a class hierarchy  Inheritance: object inherits methods and attributes of parent class  UML based on OO concepts that describe diagrams and symbols – Used to graphically model a system BY: MA
  • 27. Data Models: A Summary  Common characteristics: – Conceptual simplicity with semantic completeness – Represent the real world as closely as possible – Real-world transformations must conform with consistency and integrity characteristics  Each new data model capitalized on the shortcomings of previous models  Some models better suited for some tasks BY: MA
  • 29. Schemas, Instances, and Database State  In any data model, it is important to distinguish between the description of the database and the database itself. The description of a database is called the database schema, which is specified during database design and is not expected to change frequently.  Database Schemas is the structure of a database we mean data types, relationships, and constraints that hold a database.  Schemas is important to distinguish between the description of the database and the database itself.  The actual data in a database may change quite BY: MA
  • 30.  A displayed schema is called a schema diagram. Figure 2.1 shows a schema diagram for the database shown in Figure 1.2; the diagram displays the structure of each record type but not the actual instances of records. We call each object in the schema such as STUDENT or COURSE a schema construct.  A schema diagram displays only some aspects of a schema, such as the names of record types and data items, and some types of constraints. The actual data in a database may change quite frequently.  The data in the database at a particular moment in time is called a database state or snapshot. It is also called the current set of occurrences or instances in the database. BY: MA
  • 32. Three-Schema Architecture and Data Independence  The most important characteristics of the database approach, listed in chapter 1, some of are: 1. Use of a catalog to store the database description (schema) so as to make it self-describing, 2. Insulation of programs and data (program-data and program-operation independence),(data Independence) 3. support of multiple user views. 1. In this section we specify an architecture for database systems, called the three-schema architecture, that was proposed to help achieve and visualize these characteristics. BY: MA
  • 33. The Three-Schema Architecture  The goal of the three-schema architecture, illustrated in Figure 2.2, is to separate the user applications from the physical database which is Degrees/level of Data Abstraction.  The three-schema architecture is a convenient tool with which the user can visualize the schema levels in a database system.  A complete database is much too complex a system to be developed without first creating a simplified framework.  Data abstraction makes it possible for the developer to start from essential elements. data abstractions and incrementally add data detail to create the final system.  Database designer starts with abstracted view, then adds details BY: MA
  • 34.  Standards Planning and Requirements Committee (SPARC) Defined a framework for data modeling based on degrees of data abstraction1970s): which is in three tier architecture, schemas can be defined at the following three levels  External  Conceptual  Internal BY: MA
  • 36. 1. The external or view level  The external or view level includes a number of external schemas or user views.  Each external schema describes the part of the database that a particular user group is interested in and hides the rest of the database from that user group. – End users’ view of the data environment – ER diagrams represent external views – External schema: specific representation of an external view of Entities, Relationships, Processes, Constraints. BY: MA
  • 37. Cont…  Easy to identify specific data required to support each business unit’s operations.  Facilitates designer’s job by providing feedback about the model’s adequacy.  Ensures security constraints in database design.  Simplifies application program development BY: MA
  • 39. The Conceptual Model  The conceptual level has a conceptual schema, which describes the structure of the whole database for a community of users. The conceptual schema hides the details of physical storage structures and concentrates on describing entities, data types, relationships, user operations, and constraints.  Represents global view of the entire database  All external views integrated into single global view: conceptual schema  Complete ER model most widely used  ERD graphically represents the conceptual schema diagram BY: MA
  • 41.  Provides a relatively easily understood worldwide level view of data environment  Independent of both software and hardware – Does not depend on the DBMS software used to implement the model – Does not depend on the hardware used in the implementation of the model – Changes in hardware or software do not affect database design at the conceptual level BY: MA
  • 42. The Internal Model  The internal level has an internal schema, which describes the physical storage structure of the database. The internal schema uses a physical data model and describes the complete details of data storage and access paths for the database.  Representation of the database as “seen” by the DBMS, Maps the conceptual model to the DBMS  Internal schema depicts a specific representation of an internal model.  Depends on specific database software, Change in DBMS software requires internal model be changed  Logical independence: change internal model without affecting BY: MA
  • 44. The Physical Model  Operates at lowest level of abstraction – Describes the way data are saved on storage media such as disks or tapes.  Requires the definition of physical storage and data access methods.  Relational model aimed at logical level. – Does not require physical-level details.  Physical independence: changes in physical model do not affect internal model BY: MA
  • 46. Data Independence  The three-schema architecture can be used to further explain the concept of data independence, which can be defined as the capacity to change the schema at one level of a database system without having to change the schema at the next higher level. We can define two types of data independence:  Logical Data Independence Capacity to change the conceptual schema without changing the application programs or external schema.  Physical data independence Capacity to change the internal schema without changing the conceptual schema. BY: MA
  • 47. DBMS Languages  Once the design of a database is completed and a DBMS is chosen to implement the database, the first step is to specify conceptual and internal schemas for the database  These SQL commands are mainly categorized into four categories as: – DDL – Data Definition Language: Used by DBA and Database designers to define both conceptual and internal schemas. – DQl – Data Query Language: DML statements are used for performing queries on the data within schema objects. The purpose of DQL Command is to get some BY: MA
  • 48.  The main types of languages and interfaces that DBMSs support. – A data definition language (DDL) is used to define the database conceptual schema. In most DBMSs, the DDL also defines user views and, sometimes, storage structures; The DBMS compiles all schema definitions and stores their descriptions in the DBMS catalog. – A data manipulation language (DML) is used for specifying database retrievals and updates. DMLs can be high level (set- oriented, nonprocedural) or low level (record oriented, procedural). A high-level DML can be embedded in a host programming language, or it can be used as a standalone language; in the latter case it is often called a query language. BY: MA
  • 49. DBMS Interfaces  User-friendly interfaces provided by a DBMS may include the following: 1. Menu-Based Interfaces for Web Clients or Browsing. These interfaces present the user with lists of options (called menus) that lead the user through the formulation of a request. Menu based Interfaces. Pull-down menus are a very popular technique in Web- based user interfaces. They are also often used in browsing interfaces, which allow a user to look through the contents of a database in an exploratory and unstructured manner. 2. Forms-Based Interfaces. A forms-based interface displays a form to each user. Users can fill out all of the form entries to insert new data, or they can fill out only certain entries, in which case the DBMS will retrieve matching data for the remaining entries. Forms are usually designed and programmed for naive users as interfaces to canned transactions. BY: MA
  • 50. 3. Graphical User Interfaces: A GUI typically displays a schema to the user in diagrammatic form. The user then can specify a query by manipulating the diagram. In many cases, GUIs utilize both menus and forms. Most GUIs use a pointing device, such as a mouse, to select certain parts of the displayed schema diagram. 4. Interfaces for the DBA: Most database systems contain privileged commands that can be used only by the DBA staff. These include commands for creating accounts, setting system parameters, granting account authorization, changing a schema, and reorganizing the storage structures of a database. BY: MA
  • 51. The Database System Environment: Database System Utilities  In addition to possessing the software modules just described, most DBMSs have database utilities that help the DBA manage the database system. Common utilities have the following types of functions: – Loading. A loading utility is used to load existing data files such as text files or sequential files into the database. Usually, the current (source) format of the data file and the desired (target) database file structure are specified to the utility, which then automatically reformats the data and stores it in the database. – Backup. A backup utility creates a backup copy of the database, usually by dumping the entire database onto tape or other mass storage medium. The backup copy can be used to restore the database in case of catastrophic disk failure. Incremental BY: MA
  • 52.  Database storage reorganization. This utility can be used to reorganize a set of database files into different file organizations, and create new access paths to improve performance.  Performance monitoring. Such a utility monitors database usage and provides statistics to the DBA. The DBA uses the statistics in making decisions such as whether or not to reorganize files or whether to add or drop indexes to improve performance. BY: MA
  • 53. DBMS Classification  The typical and popular DBMS are ORACLE, SQL SERVER, MySQL SERVER, PostgreSQL , SQLite…..  We classified DBMSs according to several criteria: – Data model: The main data model used in many current commercial DBMSs is the relational data model. – The number of users supported by the system. Single- user systems support only one user at a time and are mostly used with PCs. Multiuser systems, which include the majority of DBMSs, support concurrent multiple users. BY: MA
  • 54.  The third criterion is the number of sites over which the database is distributed. A DBMS is centralized if the data is stored at a single computer site. A centralized DBMS can support multiple users, but the DBMS and the database reside totally at a single computer site. A distributed DBMS (DDBMS) can have the actual database and DBMS software distributed over many sites, connected by a computer network.  The fourth criterion is cost. It is difficult to propose a classification of DBMSs based on cost. Today we have open source (free) DBMS products like MySQL and PostgreSQL that are supported by third-party vendors with additional services. BY: MA