Database Approach Vs File Based System Lec2
Database Approach Vs File Based System Lec2
ADP CS
2nd
Database approach:
• The database approach is an improvement on the shared file solution as the
use of a database management system (DBMS) provides facilities for
querying, data security and integrity, and allows simultaneous access to data
by a number of different users.
• Files and folders are created and deleted just like any other object in
Windows. When you create a new file or folder, you specify its name, size,
location, and permissions. You can move existing files and folders around on
your disk drive. If you delete a file or folder, you remove it permanently from
your disk drive.
File based system cont.
• You can use a file system to store almost anything. You can save documents,
spreadsheets, images, music, videos, and even games.
• File systems are not intended to be used for storing data. Instead, they’re
designed to make it easier to work with files and folders.
• File systems do not automatically update themselves. Every time you add a
file or change the name of an existing file, you need to manually update the
file system.
Difference between database approach and file
based system:
• Programs and data in the database are independent.
• In the database, the data is not duplicated and appears only once.
• The data appear only once so it is always consistency.
• Data can be retrieved easily as it is stored in tables that are linked
together.
• The data is stored in one central location and can be easily
shared with others.
Database approach cont.
• The database approach provides many constraints for data
security.
• It provides many procedures to maintain security.
• It provides many facilities to maintain the programs easily.
• It is a very complex system.
• The cost is much more than the file system.
File based system:
• Programs and data in the file system are interdependent.
• In a file system, the data may be duplicated in different files that
cause data redundancy.
• Inconsistencies may arise when the same data is stored in
different files.
• Data cannot be retrieved easily as it is stored separately in
various files.
• The data is distributed across many different files and cannot be
easily shared.
File based system Cont.
• It is difficult to apply data integrity checks on the files.
• It provides poor security as the data is widely spread.
• It is difficult to maintain as it provides less controlling facilities.
• It is a less complex system.
• The cost is very less than DBMS.