Outline
Roots of the Database
System: File System
Problems with File
System Data
Management
Database System
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
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: T1
Amount: P500.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-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
Rebecca
Duran
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 FILE SALES FILE
File
Mgmt
Program
File
Report
Program
File
Mgmt
Program
AGENT FILE
File
Report
Program
FILE
STRUCTURE
FILE SYSTEM
PROGRAM
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
 3GL Languages vs 4GL 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
3GL vs 4GL
3GL 4GL
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)
 Data anomalies – develops when all of
the required changes in the redundant
data are not made successful
 Update Anomalies – not all are updated
 Insertion Anomalies
 Deletion anomalies -
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
Sales
Inventory
Accounting
Department
Hardware
Software
People
Procedures
Structures

dokumen.tips_file-systems-and-database-systems (1).ppt

  • 2.
    Outline Roots of theDatabase System: File System Problems with File System Data Management Database System
  • 3.
  • 4.
    Case of aFile 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.
  • 5.
    Manager’s File Cabinet Technical: Datapertaining to only those people whose duties were properly classified as TECHNICAL.
  • 6.
    Doing well fora 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.
  • 7.
    But the organizationgrew… 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.
  • 8.
    Consider these questions: Howmany 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?
  • 9.
    The Data ProcessingSpecialist  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.
  • 10.
    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: T1 Amount: P500.00 Renewal Date: December 12, 2012
  • 11.
    Customer File C_NAME C_PHNEC_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 Rebecca Duran 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
  • 12.
    Consider these questions: Howmany agents do we have? Sales per agent?
  • 13.
    Singular File System Eachdepartment 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.
  • 14.
    CUSTOMER FILE SALESFILE File Mgmt Program File Report Program File Mgmt Program AGENT FILE File Report Program
  • 15.
  • 17.
  • 18.
    Task of aFiling System Storing Data Saving and Organizing Updating Data (Edit or Delete) Retrieving Data Processing Data to Reports
  • 19.
    File Systems are inefficientwith the three task
  • 20.
    1. Data RetrievalTask  3GL Languages vs 4GL 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
  • 21.
    3GL vs 4GL 3GL4GL 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
  • 22.
    2. Data Storingand 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
  • 23.
    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.
  • 24.
    2. Data Updating Data Redundancy  Premise: 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 successful  Update Anomalies – not all are updated  Insertion Anomalies  Deletion anomalies -
  • 26.
  • 27.
    What is aDATABASE? The database is consist of logically related data stored in a single logical data storeroom or repository.
  • 28.
  • 29.