It is a collection of interrelated data and set of programs to access the data. It contains information about a particular enterprise and also provides an environment that is both convenient and efficient to use.
Database Applications:
Banking: all transactions
Airlines: reservations, schedules
Universities: registration, grades
Sales: customers, products, purchases
Manufacturing: production, inventory, orders, supply chain
Human resources: employee records, salaries, tax deductions
Purpose of Database Systems:
In the early days, database applications were built on top of file systems. Separate files had to be maintained for different applications that could result in redundant data across the applications. The traditional file system can be illustrated as follows:
Drawbacks of using file systems to store data are as follows:
1. Data redundancy and inconsistency
Multiple file formats, duplication of information in different files
2. Difficulty in accessing data
Need to write a new program to carry out each new task
3. Data isolation — multiple files and formats
4. Integrity problems
Integrity constraints (e.g. account balance > 0) become part of program code
Hard to add new constraints or change existing ones
5. Atomicity of updates
Failures may leave database in an inconsistent state with partial updates carried out E.g. transfer of funds from one account to another should either complete or not happen at all
6. Concurrent access by multiple users Concurrent access needed for performance
Uncontrolled concurrent accesses can lead to inconsistencies
E.g. two people reading a balance and updating it at the same time
7. Security problems
Database systems offer solutions to many of the above problems.
Database Approach:
Features of database approach:
Creates and maintains databases
Eliminates requirement for data definition statements
Acts as interface between