In the previous section we studied why a Database is required even though we had file systems. We came across some terms which were not explained:-
Redundancy: It is simply the repetition of data that may lead to problems like adding the same data multiple times may affect the depending application program.
Consistency and Integrity: It is the overall completeness and accuracy of the data. For example there are multiple Files for managing the marks of a student. Now suppose there is a change or update in the marks then the marks should be altered at each and every place and if you forget to update at a location the data becomes incorrect. Some other example may include some employee management system. Here the data about each and every employee is stored along with the department he's working on. Suppose a department is assigned to an employee mistakenly which does not exist in the other files where the data about each department is stored. No barrier is present in the entry phase of data which stops these kind of mistakes in file systems.
Privacy: Data in Database are password protected to theft of data is minimised. So only the authorised person is allowed to use the data.
Recoverability: Imagine you're working on the database and there is a power cut. Bang! all the unsaved data is gone. This unsaved data may be used by other applications but it's gone! In database the data can be easily recovered from failed transaction using various techniques like the log.
Flexiblility: Database can be easily manipulated for example, You want to add more info like in the previous section we stored the name, roll no, and marks of the student. Now we want to add another field say, Date of birth, you have to go to each and every student tag and add date of birth section in it!! this problems can be overcomed by using the database management Systems.
Security: Suppose there is a system that keeps track of all the students and the employees in the school. The access privilage is given to the students to check their attendence and marks that are stored in the System. In file system there is no barrier that prevents Students from seeing the salary of a teacher. Also the students can change their marks entry and attendence. In database System each user has its own set of priviliges in order to stop this kind of mismanagement.
So far we've seen the differences between File systems and Database and clearly Databases wins the game. Woahhh Woahhhh!! Wait!! Databases has a lot of pros but nothing is perfect so here are the cons about the databases:-
High Cost in Implementation: In the next few blogs we will learn how the data is kept in the databases and how difficult it is to design a database. This makes the implementation cost very high!
Complexity: Databases are complex arrangement of data in interrelated fashion so they are really very hard to understand.
Performance: The performance of some applications may decrease due to complex databases.
The data arrangement is nowadays done entirely on the databases. However File Systems may be useful in the case of "Small Data" because its fast and easy to understand.