Advertisement Remove all ads

What is a Record ? How It is Represented in Memory ? - Computer Science 1

Advertisement Remove all ads
Advertisement Remove all ads
Advertisement Remove all ads
Short Note

What is a Record ? How it is represented in Memory ?

Advertisement Remove all ads

Solution

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.
(4) Example:

Student File:
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.

Name   Address   Phone
Parth   12, J.K.Road   5667234
Shriniket   24, M.G. Road   5667890
Yash   12, Ramnagar   5467891
Concept: Basic Data Structures (Stack, Queue, Dequeue)
  Is there an error in this question or solution?

APPEARS IN

Advertisement Remove all ads
Share
Notifications

View all notifications


      Forgot password?
View in app×