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 the database then don’t start with the features of the database first, rather you should go with the other way around. Databases are used to solve a few problems. Now the question in your mind is what kind of problems? Consider a scenario where you have some data like data related to a 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 a 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 for a long time. This setup might work well for a few small businesses because just having data to store does not require a 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 the spreadsheet is fine, however, it might turn 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 spreadsheets will create a problem of speed. It will take you a long time to find a record from the multiple spreadsheet files.
  2. Ease of Updating Data: Multiple peoples cannot edit the same file at the same time. Other peoples must wait until files are available to update which results in wastage of time.
  3. Accuracy: When users 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 spreadsheets. 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 spreadsheets. The 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 application programs.
  3. You can control the security like you can set up 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 business rules.
  6. If the data in the database is growing faster than the modification of data easy.
  7. Facilitated development of new applications program.
  8. Logging and tracking of user actions can be easily done using a database.
  9. Reduced updating errors and increased consistency
  10. The data format of data can be easily changed.
  11. Data can be access easily using a query language and multiple peoples can edit the data simultaneously.
  12. Due to backup and recovery options databases can survive in crashes without corrupting the data.

Over to you:

In this article, we have seen What is Database and why it is needed over the flat file and its 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.


⇓ Subscribe Us ⇓


If you are not regular reader of this website then highly recommends you to Sign up for our free email newsletter!! Sign up just providing your email address below:


 

Check email in your inbox for confirmation to get latest updates Software Testing for free.


  Happy Testing!!!
 

5 thoughts on “What is database and why do we need them?”

  1. 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.

    Reply

Leave a Comment

Share This Post