Database – What is Database Management System & Their Components


Usually used to view data on theUsually used to print data on the
computer screenpaper
Data cannot be formattedData can be formatted
Data in the tables can be modifiedData cannot be modified
New data can be enteredNew data cannot be entered




  • Sometime computer program need large amount of input data. So it is very difficult to enter all data at run time.
  • Input data is stored in a file on the disk. Computer program reads the data from the data disk.
  • Similarly, programs are also often produce large output which is not possible to view the entire data on screen at run time.
  • The output from a program is written into a data file and is stored on the disk.


  • Sequential Access Files (Data read and write in a sequence. If we want to read 5th record then the first four records have to be read. Text Data Files are Sequential Access Files in C Language).
  • Random Access Files (Read and write data directly. If we want to read 5th record then we can read required record directly. Binary Data Files are Random or Direct Access Files in C Language).

 File Access Modes:

rReading Mode.
wWriting Mode.
aAppend Mode. Data can be added at the end of file.
r+Reading / Writing Mode.
w+Writing / Reading Mode.
a+Reading / Append Mode.

Opening Files:

  • “fopen” function is used to open a file.
  • Before opening a file, a file pointer is associated with it.
  • Example FILE *fp; fp=fopen(“abc.txt”,”w”);

Closing Files:

About Saweel Ur Raheem

© Copyrights 2014. All rights are reserved