1 1 file systems and databases chapter 1 prof. sin-min lee dept. of computer science

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

Upload: alicia-rogers

Post on 22-Dec-2015

214 views

Category:

Documents


0 download

TRANSCRIPT

11 File Systems and DatabasesChapter 1

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)

11

11

Figure 1.1

Sales per Employee for Each of ROBCOR’S Two Divisions

11

11

11

11

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.

11

11

Figure 1.2

The DBMS Manages the Interaction

Between the End User and the Database

11

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.

11

11

11

11

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.

11

Figure 1.3

Contents of the CUSTOMER File

11

11

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.

11

Figure 1.4

Contents of the AGENT File

11

A Simple File System

Figure 1.5

11

11

11

11

11

11

11

11

11

File System CritiqueFile System Critique

File System Data Management

File systems require extensive programming in a third-generation language (3GL).

As the number of files expands, system administration becomes difficult.

Making changes in existing file structures is important and difficult.

Security features to safeguard data are difficult to program and usually omitted.

Difficulty to pool data creates islands of information.

11

File System CritiqueFile System Critique Structural and Data Dependence

Structural DependenceA change in any file’s structure requires the modification of all programs using that file.

Data DependenceA change in any file’s data characteristics requires changes in all data access programs.

Significance of data dependence is the difference between the data logical format and the data physical format.

Data dependence makes file systems extremely cumbersome from a programming and data management point of view.

11

File System CritiqueFile System Critique Field Definitions and Naming Conventions

A good (flexible) record definition anticipates reporting requirements by breaking up fields into their components.

Example:

– Customer Name Last Name, First Name, Initial

– Customer Address Street Address, City, State

FIELD CONTENTS

CUS_LNAME Customer last name

CUS_FNAME Customer first name

CUS_INITIAL Customer initial

CUS_AREACODE Customer area code

CUS_PHONE Customer phone

CUS_ADDRESS Customer street address or box number

CUS_CITY Customer city

CUS_STATE Customer state

11

File System CritiqueFile System Critique

Field Definitions and Naming Conventions

Selecting proper field names is very important.

Names must be as descriptive as possible within restrictions.

Naming must reflect designer’s documentation needs and user’s reporting and processing requirements.

11

File System CritiqueFile System Critique Data Redundancy:

Uncontrolled data redundancy sets the stage for

Data Inconsistency (lack of data integrity)

Data anomalies

Modification anomalies

Insertion anomalies

Deletion anomalies

11

Figure 1.6

11

Figure 1.7

The Database System Environment

Figure 1.7

11

Database SystemsDatabase Systems

The Database System Components Hardware

Computer Peripherals

Software Operating systems software DBMS software Applications programs and utilities software

11

Database SystemsDatabase Systems The Database System Components

People Systems administrators Database administrators (DBAs) Database designers Systems analysts and programmers End users

Procedures Instructions and rules that govern the design and use of

the database system

Data Collection of facts stored in the database

11

Database SystemsDatabase Systems The Database System Components

The complexity of database systems depends on various organizational factors:

Organization’s size

Organization’s function

Organization’s corporate culture

Organizational activities and environment

Database solutions must be cost effective AND strategically effective.

11

Database SystemsDatabase Systems Types of Database Systems

Number of Users Single-user

– Desktop database Multiuser

– Workgroup database– Enterprise database

Scope Desktop Workgroup Enterprise

11

Database SystemsDatabase Systems

Types of Database Systems Location

Centralized Distributed

Use Transactional (Production) Decision support Data warehouse

11

11