+ All Categories
Home > Documents > DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and...

DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and...

Date post: 11-Jan-2016
Category:
Upload: adele-robinson
View: 223 times
Download: 0 times
Share this document with a friend
38
IM ISU 1 Database Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture
Transcript
Page 1: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 1Database

Fundamentals of Database Systems

Chapter 2

Database System Concepts andArchitecture

Page 2: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 2Database

Data Models Definition

A set of concepts to describe the structure of a database, and certain constraints that the database should obey

Most data models also include a set of basic operations for specifying retrievals and updates on the database

Page 3: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 3Database

Data Models (cont.)

Categories of data models Conceptual (high-level, semantic) data

models» Provide concepts that are close to the way many

users perceive data» e.g., Entity-relationship model, object data model

Physical (low-level, internal) data models» Provide concepts that describe details of how

data is stored in the computer

Page 4: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 4Database

Data Models (cont.)

Implementation (record-oriented) data models » Provide concepts that fall between the above two,

balancing user views with some computer storage details

» e.g., relational model, hierarchical model, network model

Page 5: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 5Database

Data Models (cont.)

History of data models Relational Model

» Proposed in 1970 by E.F. Codd (IBM) » First commercial system in 1981-82 » e.g., ORACLE, SYBASE, SQL Server

Page 6: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 6Database

Data Models (cont.)

Page 7: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 7Database

Data Models (cont.)

Network Model » The first one to be implemented by Honeywell in

1964-65 (IDS System) » Adopted heavily due to the support by CODASY

L (CODASYL - DBTG report of 1971) » Later implemented in a large variety of systems -

IDMS (Cullinet - now CA), DMS 1100 (Unisys), IMAGE (H.P.), VAX -DBMS (Digital)

Page 8: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 8Database

Data Models (cont.)

Page 9: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 9Database

Data Models (cont.)

Hierarchical Data Model » Implemented in a joint effort by IBM and North

American Rockwell around 1965 » Resulted in the IMS family of systems » The most popular model

Page 10: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 10Database

Data Models (cont.)

Page 11: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 11Database

Data Models (cont.)

Object-oriented Data Models» Several models have been proposed for implementing in

a database system

» One set comprises models of persistent O-O Programming Languages such as C++ (e.g., in OBJECTSTORE or VERSANT), and Smalltalk (e.g., in GEMSTONE)

» Additionally, systems like O2, ORION (at MCC - then ITASCA), IRIS (at H.P.- used in Open OODB)

» Object Database Standard: ODMG-93, ODMG-version 2.0, ODMG-version 3.0

Page 12: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 12Database

Data Models (cont.)

Object-Relational Models» Most recent trend, started with Informix

Universal Server » Relational systems incorporate concepts from

object databases leading to object-relational » Exemplified in the latest versions of Oracle-10i,

DB2, and SQL Server and other DBMSs» Standards included in SQL-99 and expected to be

enhanced in future SQL standards

Page 13: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 13Database

Schemas vs Instances

Database Schema The description of a database Includes descriptions of the database

structure and the constraints that should hold on the database

Can be displayed as a diagram (called schema diagram)

Database schema changes very infrequently

Page 14: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 14Database

Schemas vs Instances (cont.) Example schema diagram

Page 15: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 15Database

Schemas vs Instances (cont.)

Database Instance The actual data stored in a database at a

particular moment in time Also called database state (or occurrence) The database state changes every time the

database is updated» e.g., insert or delete a record

Page 16: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 16Database

Schemas vs Instances (cont.)

Example database state

Page 17: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 17Database

Schema Architecture

Three-Schema Architecture Internal schema

» Describe data storage structures and access paths at the internal level

» Typically uses a physical data model

Conceptual schema » Describe the structure and constraints for the

database at the conceptual level» Uses a conceptual or an implementation data

model

Page 18: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 18Database

Schema Architecture (cont.)

External schemas » Describe the various user views at the external

level to » Usually uses the same data model as the

conceptual level

Purposes » Support program-data independence» Support of multiple views of the data

Page 19: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 19Database

DBMS Architecture (cont.)

Page 20: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 20Database

Data Independence

Logical Data Independence The capacity to change the conceptual

schema without having to change the external schemas and their application programs

Only view definition and the mapping need be change

e.g., Changing the Grade_Report

Page 21: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 21Database

DBMS Architecture (cont.)

Page 22: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 22Database

Data Independence (cont.)

Physical Data Independence The capacity to change the internal schema

without having to change the conceptual schema

e.g., providing an access path by Semester and Year

should not change query “list all sections offered in fall 1998”

Page 23: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 23Database

DBMS Languages

Data Definition Language (DDL) Used by the DBA and database designers to s

pecify the conceptual schema In many DBMSs, DDL is also used to define

conceptual and external schemas (views) In some DBMSs,

» Internal: storage definition language (SDL)» External: view definition language (VDL)

Page 24: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 24Database

DBMS Languages (cont.)

Page 25: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 25Database

DBMS Languages (cont.)

Data Manipulation Language (DML) Used to specify database retrievals and

updates DML commands (data sublanguage) can be

embedded in a general-purpose programming language, such as COBOL, PL/1, C/C++

Alternatively, stand-alone DML commands can be applied directly (query language)

Page 26: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 26Database

DBMS Languages (cont.)

Example in SQLSELECT BDATE, ADDRESS

FROM EMPLOYEE

WHERE FNAME='John' AND MINIT='B' AND LNAME='Smith'

Page 27: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 27Database

DBMS Languages (cont.)

Example of embedded SQLEXEC SQL

declare c cursor for select customer-name, customer-cityfrom depositor, customer, accountwhere depositor.customer-name = customer.customer-name and depositor account-number = account.account-number

and account.balance > :amountEND-EXEC

Page 28: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 28Database

Database System Environment

DBMS component modules Database system utilities Tools

CASE tools, data dictionary

Application environment e.g., PowerBuilder

Communication facilities

Page 29: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 29Database

DBMS Component Modules

Page 30: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 30Database

DBMS Architectures

Centralized DBMS Combines everything into single system

including- DBMS software, hardware, application programs, and user interface processing software

User can still connect through a remote terminal – however, all processing is done at centralized site

Page 31: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 31Database

DBMS Architectures (cont.)

A physical centralized architecture

Page 32: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 32Database

DBMS Architectures (cont.)

Basic Client-Server Architectures Specialized Servers with Specialized

functions» Print server» File server» DBMS server» Web server» Email server

Clients can access the specialized servers as needed

Page 33: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 33Database

DBMS Architectures (cont.)

Logical client-server architecture

Page 34: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 34Database

DBMS Architectures (cont.)

Two Tier Client-Server Architecture A client program may connect to several

DBMSs, sometimes called the data sources In general, data sources can be files or other

non-DBMS software that manages data Other variations of clients are possible

» in some object DBMSs, more functionality is transferred to clients including data dictionary functions, optimization and recovery across multiple servers, etc.

Page 35: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 35Database

DBMS Architectures (cont.) Three Tier Client-Server Architecture

Common for Web applications Intermediate Layer called Application Server or

Web Server: » Stores the web connectivity software and the business

logic part of the application used to access data from database server

» Acts like a conduit for sending partially processed data between the database server and the client.

Three-tier Architecture Can Enhance Security » Database server only accessible via middle tier» Clients cannot directly access database server

Page 36: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 36Database

DBMS Architectures (cont.)

Logical three tier client-server architecture

Page 37: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 37Database

Classification of DBMSs

Based on the data model used Traditional: Relational, Network, Hierarchica

l Emerging: Object-oriented, Object-relational

Based on the number of users Single-user (typically used with micro- comp

uters) multi-user (most DBMSs)

Page 38: DatabaseIM ISU1 Fundamentals of Database Systems Chapter 2 Database System Concepts and Architecture.

IM ISU 38Database

Classification of DBMSs (cont.)

Based on the number of sites Centralized (uses a single computer with one

database) Distributed (uses multiple computers,

multiple databases)» Homogeneous» Heterogeneous (Federated DBMS)


Recommended