DBMS > Inroduction > Why do we use database rather than files?
Why do we use database rather than files?
The motivation for using databases rather than files has been greater availability to a diverse set of users, integration of data for easier access and update for complex transactions, and less redundancy of data. The following are the advantages of using data against using files:
- Program –Data Dependance: File descriptions are stored within each database application program that accesses a given file. Any change to a file structure requires changes to the file descriptions for all programs that access the file.
- Duplication of Data: Because applications are often developed independently in file processing systems, unplanned duplicate data files are the rule rather than the exception.
- Limited Data Sharing: With the traditional file processing approach, each application has its own private files, and users have little opportunity to share data outside their own applications.
- Lengthy Development Times: With traditional file processing systems, each new application requires that the developer essentially start from scratch by designing new file formats and descriptions and then writing the file access logic for each new program.
- Expensive Program Maintenance: The preceding factors all combined to create a heavy program maintenance load in organizations that relied on traditional file processing systems.
- Atomicity of updates: Failures may leave database in an inconsistent state with partial updates carried out. For example: Transfer of funds from one account to another should either complete or not happen at all.
- Concurrent access by multiple users: Concurrent accessed needed for performance and uncontrolled concurrent accesses can lead to inconsistencies. Example: Two people reading a balance and updating it at the same time
- Security problems: Hard to provide user access to some, but not all data