CSC 1143
FUNDAMENTAL OF DATABASE
::Week 2 ::
DATABASE
Vs
FILE BASED APPROACH
File Based Approach “File” Based Approach
(Traditional) vs File System Approach vs DBMS
File System Approach
(Computerized)
Database Management
System (DBMS)
(Computerized)
WAN RAMLAH WAN RAHIMI (WAN) 2
File Based Approach (Traditional)
❑Filing System/Manual System
❑Files stored in a cabinet
❑For safety, they are labeled and stored in one or more places
❑For security, they may have locks or located in secure areas of
building
❑When we need to look for something, we search through the filing
system from the first entry until we find what we want
❑While organizations grew, files became more complex and keeping
track of data became more difficult
WAN RAMLAH WAN RAHIMI (WAN) 3
File System Approach
❑Is a collection of application programs that perform
services for the end users such as the production of
reports. Each program defines and manages its own
data.
❑Use extensive programming in a third-generation
programming language (3GL) such as COBOL,FORTRAN
and BASIC.
WAN RAMLAH WAN RAHIMI (WAN) 4
Personal A File System Accounting
Department Department
Sales
Department
Employees Inventories Customers Sales Accounts
WAN RAMLAH WAN RAHIMI (WAN) 5
Limitations of File System Approach
(Problems)
1. Separation and isolation of data into files
• Data has to be separate or manage into files by
department or as request by manager
• It is more difficult to access the data in
multiple files
• Each program maintains its own set of data.
• Users of one program may be unaware of
potentially useful data held by other programs.
WAN RAMLAH WAN RAHIMI (WAN) 6
Limitations of File System
Approach (Problems)
2. Duplication of data
• Due to the decentralized approach taken by each department,
some data duplicate with multiple files
• It costs time and money to enter the data more than once
• Duplication can lead to loss of data integrity; the data is no longer
consistent
• When there are changes, data needs to be update with all files
related. If there are lack of entering data, it will course a more
serious problems especially when it relates with payroll.
3. Data dependence
• The physical structure of data files are defined in the application
code
• Any changes to data format needs modification to the related
programs
WAN RAMLAH WAN RAHIMI (WAN) 7
Limitations of File System
Approach (Problems)
4. Incompatible file formats
1. Data structure is dependent on the application program.
2. Therefore, its difficult to joint the process between difference
file format.
5. Fixed queries of application programs
1. File-Base Systems are very dependent upon the application
programmer.
2. Any queries or reports that are required have to be written by
the application programmer.
3. Access to the files was restricted to one user at a time.
4. Any new requirement needs a new program.
WAN RAMLAH WAN RAHIMI (WAN) 8
Advantages of Database
Approach
❑ Control of data redundancy
The database approach attempts to eliminate the redundancy by
integrating the file.
❑ Data consistency
By eliminating or controlling redundancy, the database approach
reduces the risk of inconsistencies occurring.
❑ Sharing of data
Database belongs to the entire organization and can be shared by all
authorized users.
WAN RAMLAH WAN RAHIMI (WAN) 9
Advantages of Database
Approach
❑ Improved data integrity
Database integrity provides the validity and consistency of stored data.
❑ Improved security
Database approach provides a protection of the data from the
unauthorized users.
❑ Enforcement of standards
The integration of the database enforces the necessary standards
including data formats, naming conventions, documentation standards,
update procedures and access rules.
WAN RAMLAH WAN RAHIMI (WAN) 10
Disadvantages of Database
❑ Complexity Approach
Database management system is an extremely complex piece of
software. Therefore, training for the administrators, designers
and users is required.
❑ Size
The database management system consumes a substantial
amount of main memory as well as a large number amount of
disk space in order to make it run efficiently.
WAN RAMLAH WAN RAHIMI (WAN) 11
Disadvantages of Database
Approach
❑ Cost of DBMS
A multi-user database management system may be very
expensive. Even after the installation, there is a high recurrent
annual maintenance cost on the software.
❑ Higher impact of a failure
As all users and applications reply on the database availability,
the failure of any component can bring operations to a halt and
affect the services to the customer seriously.
WAN RAMLAH WAN RAHIMI (WAN) 12
Disadvantages of Database
Approach
❑ Performance
As the database approach is to cater for many applications rather
than exclusively for a particular one, some applications may not
run as fast as before.
❑ Cost of conversion
When moving from a file-base system to a database system, the
company is required to have additional expenses on hardware
acquisition and training cost.
WAN RAMLAH WAN RAHIMI (WAN) 13
Comparison between file-based system and database
system in term of data integrity
File-based system Database system
In file-based system, data is stored more Database keep all of the information in
than once in different files, that means one place. Data integrity is enforced in
duplicate data may occur in these files. In database system since it provides
some cases, various copies of the same procedures to define and assure the
data may contain different values. integrity of the data stored within the
database. These procedures will
Example: To update a value of StudentID, automatically update the data once user
the same data must be updated in all execute insert, update, or delete
files, otherwise different file may have operations to the records.
different StudentID for the same student.
For example, if value of employeeID in
Because of this problem, it is possible that Staff table is updated, the same
data may not be in consistent state. employeeID in another table will also
Therefore, when a system contains this automatically be updated.
type of error, it loses integrity.