File Systems and Database Systems

Post on 30-Jan-2016

52 views 0 download

Tags:

description

File Systems and Database Systems. Outline. Roots of the Database System: File System Problems with File System Data Management Database System. 1. File System. Case of a File. A manager of any small organization was able to keep track of necessary data using a manual file system. - PowerPoint PPT Presentation

Transcript of File Systems and Database Systems

Outline

Roots of the Database System: File System

Problems with File System Data Management

Database System

File

System1

Case of a File A manager of any small

organization was able to keep track of necessary data using a manual file system.

A MANUAL FILE SYSTEM consist mainly of a collection of file folders, properly tagged(or labeled) and kept in a filing cabinet.

Manager’s File Cabinet

Technical:Data pertaining

to only those people whose

duties were properly

classified as TECHNICAL.

Doing well for a while

At first, data collection was relatively small and an organization’s manager had few reporting requirements, the manual system served its role well as a data storehouse.

But the organization grew… However, as the organization

grew and the storing requirements became more complex, keeping track of the data became more difficulty.

Retrieval was time consuming and cumbersome, thus, it is unlikely that the data could generate useful information.

Consider these questions: How many products sold during

the past week, month, quarter or year?

What is the current daily, weekly, quarterly or yearly sales peso volume?

Did we gain more this month compared to last month’s sales?

The Data Processing Specialist Thus, the manager needs to hire a

new kind of professional: a Data Processing (DP) Specialist.

The task is to be able to manage and process data. Process means to draw out useful information from the data.

The DP creates file structures, the software and design reports from the data.

Customers

Alfred Ramos

Phone: 0927-565-4896Address: #42 Rodeo St. Macabalan, CDOZIP: 9000

Agent Name: Leah VidalPhone: 0927-565-4444Insurance Type: T1Amount: P500.00Renewal Date: December 12, 2012

Customer FileC_NAME C_PHNE C_ADD C_ZIP A_NAME A_PHONE TP AMT REN

Alfred Ramos

0927-595-784 CDO 9000 Leah Vidal 0927-565-4444

T1 500.00 Dec 12, 2012

Jordan Belen

0928-594-5979 CDO 9000 Jasmin Trio 0927-332-1322

T1 100.00 Dec 15, 2012

RebeccaDuran

0917-449-459 DVO 8000 Leah Vidal 0927-565-4444

A1 250.00 Mar 2, 2012

Jose Reyes

0922-465-4465 DVO 8000 Jasmin Trio 00927-332-1322

T2 210.00 Mar 5, 2012

Dorothy Villafria

0927-466-7999 ILOILO 6800 Richard Silva 0922-526-4466

A2 100.00 Jan 3, 2013

Marco Mercedes

0922-965-1221 CBU 6000 Leah Vidal 0927-565-4444

T2 150.00 Jun 7, 2013

Kurt Cobaltito

0927-465-4652 ILOILO 6800 Leah Vidal 0927-565-4444

A1 200.00 Mar 29, 2012

Sophia Mendez

0927-465-4465 CEBU 6000 Richard Silva 0922-526-4466

A1 200.00 Apr 8,2013

Dominic Fuetlaki

0928-446-4656 ILIGAN 9200 Leah Vidal 0927-565-4444

T2 100.00 May 4, 2012

Consider these questions: How many agents do we

have? Sales per agent?

Singular File System

Each department has their own file system.

It is not the concern of the Customer’s Department.

The Customer’s Department must create their own file system.

CUSTOMER FILECUSTOMER FILE SALES FILESALES FILE

File Mgmt

Program

File Mgmt

Program

File Report

Program

File Report

Program

File Mgmt

Program

File Mgmt

Program

AGENT FILEAGENT FILE

File Report

Program

File Report

Program

FILESTRUCTUREFILESTRUCTURE

FILE SYSTEM PROGRAM

FILE SYSTEM PROGRAM

Problems with File System Data Management2

Task of a Filing System

Storing DataSaving and Organizing

Updating Data (Edit or Delete)

Retrieving DataProcessing Data to Reports

File Systems are inefficient with the three task

1. Data Retrieval Task 3GL Languages vs 4GL Languages 3 GL :

BASIC,C++, Fortran,CobolProgrammer to specify what must be done and how it

is to be done

4 GL :SQLProgrammers to specify what must be done without

specifying how it must be done.Save an average of 60% of lines of code

3GL vs 4GL3GL 4GL

DO WHILE NOT (EOF)Read CUSTOMERIF CUSTOMER.C_ZIP = “36123”

THEN PRINT C_NAME, C_PHONE, C_ZIP

ENDDO;

SELECT C_NAME,C_PHONE,C_ZIPFROM CUSTOMERWHERE CUSTOMER.C_ZIP=‘36123’;

1. It requires extensive programming2. There is no ad hoc query capabilities3. System Administration can be complex and difficulty4. It is difficult to make changes to existing structure5. Security features are likely to be inadequate

2. Data Storing and Organizing STRUCTURAL Structural Dependence: If the file

structure changes, the file system program must adapt.

Structural Independence: the file system program need not to change if the file structure changes

DATA Data Dependence: Data access

programs are subject to change when any of the file’s data storage characteristics change.

Data Independence: possible to make changes in the data storage characteristics without affecting the application program’s ability to access data.

2. Data Updating

Data RedundancyPremise: data should be accurate (no data

inconsistencies) and verifiable (always yield consistent results)

Data anomalies – develops when all of the required changes in the redundant data are not made successfulUpdate Anomalies – not all are updatedInsertion Anomalies Deletion anomalies -

Database Systems3

What is a DATABASE?

The database is consist of logically related data stored in a single logical data storeroom or repository.

Employees File System

Customers

SalesInventory

Accounting Department

Hardware Software People Procedures Structures