What is a Record ? How it is represented in Memory ?
A record is collection of related data items. Each data item is termed as field. File is collection of similar records. Each data item may be a group item composed of sub items.
(1) Records are a collection of nonhomogeneous data so it can not be stored in an array.
(2) In entire file of records all data elements belonging to the same identifier will be of same type. So file may be stored in memory as collection of arrays.
(3) For representation we can use one array for each data item. All the arrays should be parallel.
Name Address Phone
Parth 12, J.K.Road 5667234
Shriniket 24, M.G. Road 5667890
Yash 12, Ramnagar 5467891
The following figure shows the representation of above file in three parallel arrays Name, Address, Phone.
|Shriniket||24, M.G. Road||5667890|