Database – What is Database Management System & Their Components



 

No Forms Reports
Usually used to view data on the Usually used to print data on the
computer screen paper
Data cannot be formatted Data can be formatted
Data in the tables can be modified Data cannot be modified
New data can be entered New data cannot be entered

 

FILE MANAGEMENT

DATA FILES AND THEIR IMPORTANCE:

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

ACCESS METHOD OF FILES:

  • 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:

Mode Description
r Reading Mode.
w Writing Mode.
a Append 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:

© Copyrights 2014. All rights are reserved www.latestcontents.com