Top Banner
1 IST 210 Data, Databases, and DBMSs Todd S. Bacastow January 2004
36

Data, Databases, and DBMSs

Jan 01, 2016

Download

Documents

Data, Databases, and DBMSs. Todd S. Bacastow January 2004. Real World. Conceptual Data Model. Physical. A Process of Mapping. Representational (Implementation) Data Model. High level model Comprises Entities Attributes Relationships. Relational Hierarchical Network - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Data, Databases, and DBMSs

1

IST 210 Data, Databases, and DBMSs

Todd S. BacastowJanuary 2004

Page 2: Data, Databases, and DBMSs

2

IST 210 A Process of Mapping

Real WorldConceptualData Model

–High level model–Comprises

–Entities–Attributes–Relationships

–Relational–Hierarchical–Network–Object Oriented

Representational(Implementation)

Data Model

Physical

Page 3: Data, Databases, and DBMSs

3

IST 210 Data Models A data model describes

the structure of a database data types, relationships, constraints,

a set of basic operations insert, delete, modify, retrieve

user-defined operations for more dynamic database applications

Page 4: Data, Databases, and DBMSs

4

IST 210 Categories of Data Models

Conceptual concepts: entity, attribute, relationship Entity-Relationship model (DBMS-independent)

Logical data represented by record structure E.g. relational, network, hierarchical

Physical describes how data is stored in the disk

Page 5: Data, Databases, and DBMSs

5

IST 210

ExternalLevel

Conceptual Level

InternalLevel

DBMS Architecture

Real WorldConceptualData Model

LogicalData Model

Physical

External

Page 6: Data, Databases, and DBMSs

6

IST 210

External Level

Conceptual Level

Internal Level

DBMS Architecture

Conceptual Schema

Internal Schema

ExternalView

ExternalView

Page 7: Data, Databases, and DBMSs

7

IST 210 External Level

Describes a part of the database for a particular user group and hides the rest

Supports multiple views of a database Same data model as the conceptual schema

External Level

ExternalView

ExternalView

Page 8: Data, Databases, and DBMSs

8

IST 210 Conceptual Level

Data Abstraction hides unnecessary details

Conceptual Level hides physical layer

Data types, Constraints, User Operations Uses both conceptual/logical data models

Conceptual Level Conceptual Schema

Page 9: Data, Databases, and DBMSs

9

IST 210 Internal Level Defines physical storage on the disk Defines data location

path, blocks, pages, … Device specific

STORED_EMP BYTES=20PREFIX BYTES=20, OFFSET=0EMP# BYTES=20, OFFSET=6, INDEX=EMPXDPET# BYTES=20, OFFSET=12PAY BYTES=20, OFFSET=16, ALIGN=FULLWORD

Internal Level Internal Schema

Page 10: Data, Databases, and DBMSs

10

IST 210 DB Schema vs. DB State

Database Schema description of the database is specified during database design

Database State (extension of the schema) current state of the database: a snapshot actual data instances in a DB changes over time by update initially, a database is empty state with no data then, populate (load) the database with data

Page 11: Data, Databases, and DBMSs

11

IST 210 DB Schema vs. DB State

Valid State DBMS checks every state of the database does it satisfy the structure and constraints

specified in the schema? Schema Diagram

Displays database schema

Page 12: Data, Databases, and DBMSs

12

IST 210 Example Schema

Page 13: Data, Databases, and DBMSs

13

IST 210 Database Schema

Meta-data descriptions of the schema constructs and

constraints stored in the database catalog

Schema Evolution Schema change prompted by the change of

application requirements

Designer Goal : develop a schema

that changes infrequently

Page 14: Data, Databases, and DBMSs

14

IST 210 DBMS Mapping

Conceptual Schema

Internal Schema

ExternalView

ExternalView

Page 15: Data, Databases, and DBMSs

15

IST 210 DBMS Mapping Mappings for multi-level DBMS

to transform a request specified at one level into the request at another level

access: external conceptual internal DB retrieve: DB internal conceptual external

Three-Schema Architecture advantage: true data independence disadvantage: overhead cost of mappings

Page 16: Data, Databases, and DBMSs

16

IST 210 Data Independence What happens when the schema changes at

some level? Data Independence

the capacity to change the schema at one level without having to change the schema at the next higher level

Two Types of Data Independence logical and physical data independence

Page 17: Data, Databases, and DBMSs

17

IST 210 Data Independence (con’t)

1. Logical Data Independence capacity to change the conceptual schema without

having to change the external schema when: logical reorganization of the database

2. Physical Data Independence change the internal schema without having to

change the conceptual schema when: physical reorganization of the files

Page 18: Data, Databases, and DBMSs

18

IST 210 DBMS Languages

Data Definition Language (DDL)• to define DB conceptual schema

Data Manipulation Language (DML)• to specify database requests: update, retrieval• high-level DML: describes which data to retrieve• low-level DML: describes how to retrieve it

Page 19: Data, Databases, and DBMSs

19

IST 210 DBMS Languages (con’t)

High-level DML: set-oriented, declarative Low-level DML: record-oriented, procedural Types of DML

• data sublangauge: DML embedded in a general purpose language (for DBAs)

• query language: high-level, interactive, stand-alone DML (casual end users)

• user-friendly interface for DML (naïve users)

Page 20: Data, Databases, and DBMSs

20

IST 210 DBMS Interfaces

Menu-based interfaces: pull-down menu Forms-based interfaces: Access Forms Graphical User Interfaces (GUI) Natural language interfaces

• interpret requests to high-level queries Command line

Page 21: Data, Databases, and DBMSs

21

IST 210 Database System Environment

DBMS Component Modules Managers, i.e., disk control Compiler, i.e., query Processors

Page 22: Data, Databases, and DBMSs

22

IST 210

Page 23: Data, Databases, and DBMSs

23

IST 210 System Utilities & Tools

Loading loads existing data files into the database DBMS conversion, reformatting the data

Backup provides a backup copy of the database incremental backup: updates changes only

File Reorganization to improve performance

Page 24: Data, Databases, and DBMSs

24

IST 210 System Utilities & Tools

Performance Monitoring monitors database usage provides statistics

Data Dictionary also called information repository stores additional information: (catalog) + design

decisions, usage standards, user information, application program descriptions

Page 25: Data, Databases, and DBMSs

25

IST 210

Terminal

Mainframe

Storage

Logic

Presentation

Network

Mainframe/terminal

Mainframe/ terminal

Page 26: Data, Databases, and DBMSs

26

IST 210 Mainframe/terminal

Storage, Logic and Presentation all in same place

No platform specific user interface Doesn’t take advantage of client machine

Page 27: Data, Databases, and DBMSs

27

IST 210

Client

Server

Storage

Logic

Presentation

Network

DBMS

Client Server without stored procedures

Page 28: Data, Databases, and DBMSs

28

IST 210 Client/Server w/o stored procedures

Database server handles storage only Logic and presentation in client Takes advantage of client cpu Logic changes require client redistribution Integrity not maintained if other DB tool used Each user needs to be a specific database user

Page 29: Data, Databases, and DBMSs

29

IST 210

Client

Server

Storage

Logic

Presentation

Network

DBMS

Client Server with stored procedures

Page 30: Data, Databases, and DBMSs

30

IST 210 Client/Server with stored procedures

Database handles storage and business logic Logic changed in one place, no

redistribution of client DBMS dependent code Each user needs to be specific database user

Page 31: Data, Databases, and DBMSs

31

IST 210

Client

Server

Storage

Logic

Presentation

Network

DBMS

Client Server with 3 tiers

Page 32: Data, Databases, and DBMSs

32

IST 210 Three Tiered -- what is it?

Storage in database Logic in Transaction Monitor Client does presentation only Authentication and Access control can be

done in TP monitor Each user does NOT have to be a database

user

Page 33: Data, Databases, and DBMSs

33

IST 210

Client

Database Servers

Storage

Logic

Presentation

Network

DBMS

Transaction Monitor

Network

DBMS

Storage

Client Server with 3 tiers

Page 34: Data, Databases, and DBMSs

34

IST 210 What is a Transaction Monitor?

A component which sits between the client and the database server to insure reliable updates of information

Used in airline reservation and banking systems

Page 35: Data, Databases, and DBMSs

35

IST 210 Why 3 Tiers?

Scalability multiple transaction monitors load balancing

Flexibility Complexity

update multiple data stores Two phase commit with multiple databases

Page 36: Data, Databases, and DBMSs

36

IST 210 Classifications of DBMSs

Data Model (OO, Relational, hierarchical) Number of Users ( single vs. multi-user) Number of Database Sites ( centralized vs.

distributed vs. federated) Special-purpose vs. general-purpose