FILE SYSTEMS AND DATABASE SYSTEMS Outline Roots of
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. �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 � Personnel �Technical �Sales �Admin 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 -4896 Address: #42 Rodeo St. Macabalan, CDO ZIP: 9000 Agent Name: Leah Vidal Phone: 0927 -565 -4444 Insurance Type: T 1 Amount: P 500. 00 Renewal Date: December 12, 2012
Customer File C_NAME C_PHNE C_ADD C_ZIP A_NAME A_PHONE TP AMT REN Alfred Ramos 0927 -595 -784 CDO 9000 Leah Vidal 0927 -5654444 T 1 500. 00 Dec 12, 2012 Jordan Belen 0928 -594 -5979 CDO 9000 Jasmin Trio 0927 -3321322 T 1 100. 00 Dec 15, 2012 Rebecca Duran 0917 -449 -459 DVO 8000 Leah Vidal 0927 -5654444 A 1 250. 00 Mar 2, 2012 Jose Reyes 0922 -465 -4465 DVO 8000 Jasmin Trio 00927 -332 -1322 T 2 210. 00 Mar 5, 2012 Dorothy Villafria 0927 -466 -7999 ILOILO 6800 Richard Silva 0922 -5264466 A 2 100. 00 Jan 3, 2013 Marco Mercedes 0922 -965 -1221 CBU 6000 Leah Vidal 0927 -5654444 T 2 150. 00 Jun 7, 2013 Kurt Cobaltito 0927 -4652 ILOILO 6800 Leah Vidal 0927 -5654444 A 1 200. 00 Mar 29, 2012 Sophia Mendez 0927 -465 -4465 CEBU 6000 Richard Silva 0922 -5264466 A 1 200. 00 Apr 8, 2013 Dominic Fuetlaki 0928 -446 -4656 ILIGAN 9200 Leah Vidal 0927 -5654444 T 2 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.
File Mgmt Program File Report Program SALES FILE Personnel Dept Sales Dept CUSTOMER FILE File Mgmt Program AGENT FILE File Report Program
FILE SYSTEM PROGRAM FILE STRUCTURE
2 Problems with File System Data Management
Task of a Filing System �Storing Data �Saving and Organizing �Updating Data (Edit or Delete) �Retrieving Data �Processing Data to Reports
File Systems are inefficient with the three task
1. Data Retrieval Task 3 GL Languages vs 4 GL Languages � 3 GL : � �BASIC, C++, Fortran, Cobol �Programmer to specify what must be done and how it is to be done � 4 GL : �SQL �Programmers to specify what must be done without specifying how it must be done. �Save an average of 60% of lines of code
3 GL vs 4 GL 3 GL 4 GL DO WHILE NOT (EOF) Read CUSTOMER IF CUSTOMER. C_ZIP = “ 36123” THEN PRINT C_NAME, C_PHONE, C_ZIP ENDDO; SELECT C_NAME, C_PHONE, C_ZIP FROM CUSTOMER WHERE CUSTOMER. C_ZIP=‘ 36123’; 1. It requires extensive programming 2. There is no ad hoc query capabilities 3. System Administration can be complex and difficulty 4. It is difficult to make changes to existing structure 5. 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 Redundancy �Premise: data should be accurate (no data inconsistencies) and verifiable (always yield consistent results) anomalies – develops when all of the required changes in the redundant data are not made successful � Data �Update Anomalies – not all are updated �Insertion Anomalies �Deletion anomalies -
3 Database Systems
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 Inventory Sales Accounting Department
�Hardware �Software �People �Procedures �Structures
- Slides: 29