Top Banner
1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science
57

1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

Dec 16, 2015

Download

Documents

Prosper White
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: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11 File Systems and Databases

Chapter 1 The Worlds of Database Systems

Prof. Sin-Min Lee

Dept. of Computer Science

Page 2: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Tuesday Thursday

10:15 – 11:30

Page 3: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

??!

Your evaluation in this course is determined by:

30%

Class Presentation 10%

Presentation report 5%

Page 4: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Page 5: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Page 6: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11Text Book

NARAYAN S. UMANATH & RICHARD W. SCAMELL, DATA MODELING AND DATABASE DESIGN, 2007 Thomson

Page 7: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11A. Silberschatz, H.F. Korth, S. Sudarshan: Database System

Concepts, 5th Ed., McGraw-Hill, 2006. A. Silberschatz, H.F. Korth, S. Sudarshan: Database System

Concepts, 5th Ed., McGraw-Hill, 2006.

GOOD REFERENCE

Page 8: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

The mediocre teacher tells.

The good teacher explains.

The superior teacher demonstrates.

The great teacher inspires.

Page 9: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Files and DatabasesFiles and Databases

File: A collection of records or documents dealing with one organization, person, area or subject (Rowley) Manual (paper) files Computer files

Database: A collection of similar records with relationships between the records (Rowley) Bibliographic, statistical, business data, images, etc.

Page 10: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Introducing the DatabaseIntroducing the Database

Major Database Concepts Data and information

Data - Raw facts

Information - Processed data

Data management

Database

Metadata

Database management system (DBMS)

Page 11: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Page 12: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Page 13: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Figure 1.1

Sales per Employee for Each of ROBCOR’S Two Divisions

Page 14: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Page 15: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Database SystemsDatabase Systems Types of Database Systems

Number of Users Single-user

– Desktop database Multiuser

– Workgroup database– Enterprise database

Scope Desktop Workgroup Enterprise

Page 16: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Database SystemsDatabase Systems

Types of Database Systems Location

Centralized Distributed

Use Transactional (Production) Decision support Data warehouse

Page 17: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

DatabaseDatabase

A Database is a collection of stored operational data used by the application systems of some particular enterprise (C.J. Date) Paper “Databases”

Still contain a large portion of the world’s knowledge File-Based Data Processing Systems

Early batch processing of (primarily) business data Database Management Systems (DBMS)

Page 18: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Why DBMS?Why DBMS?

History 50’s and 60’s all applications were custom built for particular

needs File based Many similar/duplicative applications dealing with collections

of business data Early DBMS were extensions of programming languages 1970 - E.F. Codd and the Relational Model 1979 - Ashton-Tate and first Microcomputer DBMS

Page 19: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

File Based SystemsFile Based Systems

Naughty

NiceJust what asked for

CoalEstimation

DeliveryList

Application File

ToysAddresses

Toys

Page 20: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

From File Systems to DBMSFrom File Systems to DBMS

Problems with file processing systems Inconsistent data Inflexibility Limited data sharing Poor enforcement of standards Excessive program maintenance

Page 21: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

DBMS BenefitsDBMS Benefits

Minimal data redundancy Consistency of data Integration of data Sharing of data Ease of application development Uniform security, privacy, and integrity controls Data accessibility and responsiveness Data independence Reduced program maintenance

Page 22: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Terms and ConceptsTerms and Concepts

Data independence Physical representation and location of data and the use of

that data are separated The application doesn’t need to know how or where the

database has stored the data, but just how to ask for it Moving a database from one DBMS to another should not have

a material effect on application program Recoding, adding fields, etc. in the database should not affect

applications

Page 23: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Database EnvironmentDatabase Environment

CASE Tools

DBMS

UserInterface

ApplicationPrograms

Repository Database

Page 24: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Database ComponentsDatabase ComponentsDBMS

===============

Design toolsTable CreationForm CreationQuery CreationReport Creation

Procedural language

compiler (4GL)=============

Run timeForm processorQuery processor

Report WriterLanguage Run time

UserInterface

Applications

ApplicationProgramsDatabase

Database contains:User’s DataMetadataIndexesApplication Metadata

Page 25: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Types of Database SystemsTypes of Database Systems

PC databases Centralized database Client/server databases Distributed databases Database models

Page 26: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

PC DatabasesPC Databases

E.g.:AccessFoxProDbaseEtc.

Page 27: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Centralized DatabasesCentralized Databases

Central Computer

Page 28: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Client Server DatabasesClient Server Databases

NetworkClient

Client

Client

DatabaseServer

Page 29: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Distributed DatabasesDistributed Databases

computercomputer

computer

Location A

Location CLocation B

HomogeneousDatabases

Page 30: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Distributed DatabasesDistributed Databases

Local Network

DatabaseServer

Client

Client

CommServer

Remote Comp.

Remote Comp.

HeterogeneousOr FederatedDatabases

Page 31: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Page 32: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Page 33: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Page 34: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Introducing the DatabaseIntroducing the Database Importance of DBMS

It helps make data management more efficient and effective.

Its query language allows quick answers to ad hoc queries.

It provides end users better access to more and better-managed data.

It promotes an integrated view of organization’s operations -- “big picture.”

It reduces the probability of inconsistent data.

Page 35: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Page 36: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Figure 1.2

The DBMS Manages the Interaction

Between the End User and the Database

Page 37: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Page 38: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Introducing the DatabaseIntroducing the Database

Why Database Design Is Important?

A well-designed database facilitates data management and becomes a valuable information generator.

A poorly designed database is a breeding ground for uncontrolled data redundancies.

A poorly designed database generates errors that lead to bad decisions.

Page 39: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Page 40: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Page 41: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Page 42: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Page 43: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Historical RootsHistorical Roots Why Study File Systems?

It provides historical perspective.

It teaches lessons to avoid pitfalls of data management.

Its simple characteristics facilitate understanding of the design complexity of a database.

It provides useful knowledge for converting a file system to a database system.

Page 44: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Figure 1.3

Contents of the CUSTOMER File

Page 45: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Page 46: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Page 47: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Table 1.1 Basic File TerminologyData “Raw” facts that have little meaning unless they have been

organized in some logical manner. The smallest piece of datathat can be “recognized” by the computer is a singlecharacter, such as the letter A, the number 5, or somesymbol such as; ‘ ? > * +. A single character requires onebyte of computer storage.

Field A character or group of characters (alphabetic or numeric)that has a specific meaning. A field might define a telephonenumbers, a birth date, a customer name, a year-to-date(YTD) sales value, and so on.

Record A logically connected set of one or more fields that describesa person, place, or thing. For example, the fields thatcomprise a record for a customer named J. D. Rudd mightconsist of J. D. Rudd’s name, address, phone number, dateof birth, credit limit, unpaid balance, and so on.

File A collection of related records. For example, a file mightcontain data about ROBCOR Company’s vendors; or, a filemight contain the records for the students currently enrolledat Gigantic University.

Page 48: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Figure 1.4

Contents of the AGENT File

Page 49: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

A Simple File System

Figure 1.5

Page 50: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Page 51: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Page 52: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Page 53: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Page 54: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Page 55: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Page 56: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11

Page 57: 1 1 File Systems and Databases Chapter 1 The Worlds of Database Systems Prof. Sin-Min Lee Dept. of Computer Science.

11