What is a Database or Database Management System (DBMS)? OR What is the difference between a file and a database? OR Can files qualify as a database?

 Posted by ArticlesMaint on 9/18/2009 | Category: Sql Server Interview questions | Views: 4305

Note: - Probably these questions are too basic for experienced SQL SERVER guys. But from a fresher’s point of view, it can be a difference between getting a job and being jobless.

  1. Database provides a systematic and organized way of storing, managing and retrieving from a collection of logically related information.

  2. Secondly, the information has to be persistent, that means even after the application is closed the information should be persisted.

  3. Finally, it should provide an independent way of accessing data and should not be dependent on the application to access the information.

Ok, let me spend a few more sentences on explaining the third aspect. Below is a simple figure of a text file that has personal detail information. The first column of the information is Name, second Address and finally Phone Number. This is a simple text file, which was designed by a programmer for a specific application.

Non-Uniform Text File

It works fine in the boundary of the application. Now, some years down the line a third party application has to be integrated with this file. In order for the third party application to be integrated properly, it has the following options:

  • Use the interface of the original application.

  • Understand the complete details of how the text file is organized, example the first column is Name, then Address and finally Phone Number. After analyzing, write a code which can read the file, parse it etc. Hmm, lot of work, right.

That’s what the main difference is between a simple file and a database; database has an independent way (SQL) of accessing information while simple files do not (That answers my twisted question defined above). File meets the storing, managing and retrieving part of a database, but not the independent way of accessing data.

Note: - Many experienced programmers think that the main difference is that file cannot provide multi-user capabilities which a DBMS provides. But if you look at some old COBOL and C programs where files were the only means of storing data, you can see functionalities like locking, multi-user etc. provided very efficiently. So it’s a matter of debate. If some interviewers think of this as a main difference between files and database, accept it… going in to debate means probably losing a job.

(Just a note for fresher’s: Multi-user capabilities mean that at one moment of time more than one user should be able to add, update, view and delete data. All DBMS' provides this as in-built functionalities, but if you are storing information in files, it’s up to the application to write logic to achieve these functionalities).

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response