Netsparker Web Application Security Scanner

What is database and why do we need them?

Welcome to next post related to Database. Everyone know about the database, it is used to store the data. However the data can be stored in the excel file or in flat files.

Have you think about “What is actually meaning of database and why do we need them?

If you want to understand database then don’t start with the features of database first, rather you should go with other way round. Database are used to solve few problems. Now question in your mind is that what kind of problems? Consider a scenario where you have some data like a data related to customer, employee, banking etc. and you have to save the data in any type of formats like text, images, numbers, dates, amounts, documents, audio or video etc. You can store the data in text or excel spreadsheet. You can also use the folder structure to organize your file. So why do you need the database? Many of the small businesses continue to using Text files or Excel spreadsheets since long time. This setup might works good for few small businesses, because just having data to store does not require database. So only having data is not a problem here.

what is database

There are some unique problems if not using the database:

  1. Size of Data: The small amount of data storing into spreadsheet is fine, however it might turns into a large amount of data then Spreadsheet solution will not work. Even if the size of data records goes into millions then storing data in multiple spreadsheet which will create a problem of speed. It will take you long time to find a record from the multiple spreadsheet files.
  2. Ease of Updating Data: Multiple peoples cannot edit the same file on same time. Other peoples must wait until files are available to update which results into wastage of time.
  3. Accuracy: When user doing data entry in files then it might be possible to incorrect data due to no validation present like you can enter wrong spelling, wrong dates, and wrong amount. So the Data accuracy is hard to maintain and accuracy is in question.
  4. Security: You cannot secure the data in the text files and spreadsheet. Anyone can access the file and read any data present in the file. So storing data will not work with banking, healthcare application, payroll department where privacy is difficult to maintain.
  5. Redundancy: The duplication of data can be possible using text files or spreadsheet. Chances of adding multiple copies of data cannot be limited here. This will leads to accuracy issues. Maintaining and updating multiple copies is not an easy task.
  6. Incomplete Data: Some of the data is not considered not important, so such data not entered in the file as no validation in place which leads the data integrity is in question.

To prevent above problem associated with storing data in the text file or spreadsheet the database is required.

Advantages of a relational database over flat file:

  1. It will help to avoid data duplication and reduced data redundancy.
  2. Greater data integrity and independence from applications programs.
  3. You can control the security like you can setup the permission on different levels where only specified users can add, update or delete the data.
  4. The cost of data entry, storage, and retrieval is drastically reduced.
  5. Data can be validated based on the business rules.
  6. If the data in database is growing faster than modification of data easy.
  7. Facilitated development of new applications program.
  8. Logging and tracking of user actions can be easily done using database.
  9. Reduced updating errors and increased consistency
  10. Data format of data can be easily change.
  11. Data can be access easily using query language and multiple peoples can edit the data simultaneously.
  12. Due to backup and recovery options database can survive in crashes without corrupting the data.


Over to you:

In this article we have seen about What is Database and why it is needed over the flat file and it ‘s advantages. If you enjoy reading this article please make sure to share it with your friends. Please leave your questions/tips/suggestions in the comment section below and I’ll try to answer as many as I can.



5 comments to What is database and why do we need them?

  • prathap

    Nice one I like this article

  • Glandu

    Hi. Databases(that can be non-relational, though this is not common) have plenty of qualities, but the main one is access for multiple users at the same time. No flat file system can allow this as well.

    They are not without drawbacks either. when getting complex, the access through SQL can be prohibitively complex. In many mainframe shops(banks, insurances…), I’ve seen the following schema :
    (1)During the day, many agents work at the same time on the data. The program they work with interact with the database.
    (2)During the night, one single batch works on the data. All the data. A common practice is to unload the database into a flat file, work on the flat file, and reinject the flat file with the new data into the SQL database.

    Flat files are especially efficient for one single user that modifies everything at the same time. In bank/insurances, it is a common problem to solve. Testing the batch, often, can be done like that :
    (1)insert data in the database
    (2)run the full batch
    (3)check the database

    playing with flat file can help you testing the batch itself, but for validation the whole process, mastery of SQL is mandatory.

  • Dam

    Nice site for software testing begineers. Vast topics covered over software testing.

  • Indrajeet

    Very nice article.

  • Jonali

    it is helpful..

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>