0% found this document useful (0 votes)
84 views41 pages

DBWK 2

Uploaded by

ashita2201
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
84 views41 pages

DBWK 2

Uploaded by

ashita2201
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 41

Week 2

Database System
Concepts and
Architecture
Hierarchical
Data Model
First Generation
Network
Data Model

Evaluation of Second Generation


Relational
Data Model

Data Models ER
Data Model

Semantic
Data Models
Third Generation

Object-Relational Object-Oriented
Data Model Data Model
Hierarchical Model Diagram
Hierarchical Model
ADVANTAGES:

-construct
Hierarchical Model is simple to
and operate on

-Corresponds to a number of natural


hierarchically organized domains –
e.g., assemblies in manufacturing,
personnel organization in companies
Hierarchical Model – cont…
ADVANTAGES:

– Language is simple; uses constructs


like GET, GET UNIQUE, GET
NEXT, GET NEXT WITHIN
PARENT etc.

– Suitable for voluminous database


and large number of transactions,
using data whose relationships are
fixed over time.
Hierarchical Model – cont…
DISADVANTAGES:

- Navigational and procedural nature of


processing

- arrangement
Database is visualized as a linear
of records

- Little scope for "query optimization“


Network Model Diagram
Network Model
ADVANTAGES:

– Appropriate for complex relationships


(many-to-many) and represents
semantics of add/delete on the
relationships.

– Can handle most situations for


modeling using record types and
relationship types.
Network Model cont …
ADVANTAGES:
– Language is navigational; uses
constructs like FIND, FIND
member, FIND owner, FIND NEXT
within set, GET etc.

– Programmers can do optimal


navigation through the database.
Network Model cont …
DISADVANTAGES:

– Navigational and procedural nature


of processing

– Database contains a complex array


of pointers that thread through a set
of records.
Network Model cont …
DISADVANTAGES:
– Little scope for automated "query
optimization”

– Difficult to design and use


properly.
It is difficult to make changes in a
database, and some changes are
impossible to make.
Person
Object
Name
Oriented Object
Class
lName
Attributes
fName
Model - DOB

Diagram getAge Methods

Staff PrivateOwner Client

StaffNo (PK) OwnerNo (PK) ClientNo (PK)


Sub Position address TelNo
Class Gender PrefType
Salary MaxRent
Name
Name lName Name
lName fName lName
fName DOB fName
DOB DOB

getMonthlySalary getAge getAge


getAge
Object Oriented Data Model
– Based on a collection of objects.

– Object contains values stored in


instance variables within the object.

– Object also contains bodies of code


(methods) that operate on the object.

– Objects that contain same type of


values and same methods are
grouped into classes.
Object Oriented Data Model cont …

– A class may be viewed as a type


definition for objects.

– Only way one object can access


data of another object is by
invoking a method of that other
object. (Sending a message to
the object)
ER Model Crow Foot Diagram

‘Each credit customer has to


pay monthly installment over an
agreed period’

Customer Installments

Entity
Subject on which
data is held
ER Model cont… EER Diagram
Name
CustID PayDate
Contact PayNo CustID

1 pays n
Customer Installments

AmtDue DateDue PayMode

Attribute
Detail/Description
about the entity
Relational Model
Customer CustID Name Contact AmtDue DateDue
C001 Bob 444 2211 2000 121009
C002 Harry 555 3366 5000 251210
Relation Name C003 Jim 666 4477 6000 180909

Attributes

Installment PayNo PayDate PayMode CustID


10 251109 Cash C001
11 300110 Cheque C002
12 270210 Card C002
Tuples
13 201009 Cash C003
14 301209 Card C001
15 250310 Card C002
Relational Model cont…

– Achieves the structural


independence not found in the
hierarchical and network models.

– Any type of association be it one-to-


one, one- to-many, many-to-many
can be easily implemented with the
relational model.
Relational Model cont…

– Has a very powerful and flexible


query capability.

– However, the relational database


model tends to be slower than the
other database models.
Database – 3-Schema Architecture

Stored Database
Database – 3-Schema Architecture cont…
External schema

– Describes the various user views – reflects a


simplified model of the world
– Allows applications to see as much of data as
they require, while excluding unrelated data
items

– Interfaces with conceptual schema

– May be modified or created without altering


physical storage of data, modification reflected
in the interface
Database – 3-Schema Architecture cont…
Conceptual schema

– Concerned with data rather than storage or


access, concentrates on describing entities,
data types, relationships, user operations, and
constraints (structure).

‒ Interfaces with external and internal schema

‒Logical data independence is the capability to


change the conceptual schema without having to
change external schemas or application programs
When the conceptual schema undergoes a reorganization, the application
programs that reference the external constructs, must work as before.
Database – 3-Schema Architecture cont…
Internal schema
‒ Describes physical storage structures and
access paths. Typically uses a physical data
model.

– Interfaces with conceptual schema, identifies how


an item in the conceptual schema is stored and
accessed
– Physical data independence is the capability to
change the internal schema without having to
change the conceptual schema. Hence, the
external schemas need not to be changed as well
When the internal files undergo a reorganization, the conceptual model need
not change if the same data as before remains in the database
Schemas vs Instances
Next Week Lecture

DBMS Languages
Next Lab Session
A database system is
Overall System broadly divided into
Architecture
Storage Manager

and Query Processor


Naïve users Sophisticated
Application Database
(tellers, agents, users
programmers Administrator
web-users (analysts)

use write use use

Compiler and
DML Queries DDL Interpreter
Linker
Application
Query Tools
Interfaces
Application
Program Query DML Compiler Query Processor
Object Code Evaluation and Organiser
Engine

Application Administration Storage Manager


Programs Authorization
Buffer Manager File Manager Tools Transaction Manager
Integrity Manager

Disk Storage
Indices Data Dictionary

Data Statistical Data


Storage Manager
1. A program module that provides the interface
between the low-level data stored in the database
and the application programs and queries
submitted to the system.

2. It is responsible for the interaction with the file


manager.

3. It translates the various DML statements into low-


level file commands.

4. It is responsible for the storing, retrieving, and


updating data in the database.
Storage Manager cont…
It includes the following components:

Authorization and integrity manager that


tests for the satisfaction of the integrity
constraints and checks the authority of
users to access data.

Transaction manager which ensures that


the db remains in a consistent state despite
system failures and that concurrent
transaction executions proceed without
conflicting.
Storage Manager cont…

File manager which manages the


allocation of disk space and the data
structures used to represent info. Stored
on the disk.

Buffer Manager that is responsible for


responsible for fetching data from the
disk storage into main memory and
deciding which data to cache in the main
memory
Storage Manager cont…
It implements several data structures as part
of the physical system implementation.

Data fileswhich store the data itself.

Data dictionarywhich stores the metadata


about the structure of the db.

Indiceswhich provide fast access to data


items that hold particular values.
Query Processor
DDL interpreter that interprets DDL statements
and records into the definitions in the data
dictionary.

DML compiler that translates DML statements


in a query language into an evaluation plan
consisting of low-level instructions that query
evaluation engine understands.

Query evaluation engine which executes low-


level instructions generated by the DML
compiler.
Centralized
Multi-User DBMS
Architectures File-Server

Client-Server
Centralized
Dumb Terminals

Physically connected to the Central


Host Computer.

Has no processing capability.

Can only send information to and


retrieve from the central computer.

Central Host Computer (CHC)

Tremendous burden on the CHC.


Central Host Had to run the application programs
Computer and DBMS.

Dumb Responsible for the interaction with


Terminals the user.
Replacing expensive
Central Host
Computers
(e.g Mainframes) with
more cost-effective
Downsizing networks of
personal computers
leading to the next
two architectures:

File-Server and

Client-Server.
File-Server Workstations

Intelligent Terminals with processing


Capability and storage capacity.

Applications and DBMS run on each


workstation

The DBMS sends requests to the


file-server for all data that the DBMS
requires that is stored on disk.
LAN
File-Server

File-Server Holds the files required by the


applications and DBMS, therefore
acting as a shared hard disk drive.

This approach can generate a


tremendous amount of network
Workstation traffic leading to performance
degradation.

Database
Clients
Two-Tier Client -Server Manage the user interface. Accept
and check syntax of user input.

Process application logic.

Generate database requests and


transmit to server. Pass response
back to user.

Server
LAN Accept and process database
requests from client.

Server with Check authorization. Ensure integrity


DBMS constraint not violated.

Perform query/update processing and


transmit response to client.

Client Maintain system catalog.

Provide concurrent database access.


Database Provide recovery control.
Two-Tier Client -Server cont…
User Interface Programs and Application
Programs run on the client side.

Interface called ODBC (Open Database


Connectivity) provides an Application program
interface (API) that allow client side programs to
call the DBMS. Most DBMS vendors provide
ODBC drivers.

Clients may be transferred more responsibility


including data dictionary functions, optimization
and recovery across multiple servers, etc. In
such situations the server may be called the
Data Server.
Enterprise Scalability

The need for a More complex


Three-Tier Client Applications

Server Architecture Deployment to hundreds


or thousands of
end-users.
Three -Tier Client -Server cont…

First Tier Client •User Interface

Second Tier Application Server •Business Logic


or Web Server •Data Processing Logic
•Acts like a conduit for
sending partially
processed data
between the database
server and the client.
Third Tier Database Server •Data Validation
•Database access

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