Question

In terms of general operating system concepts, what is the difference between a file and a record?

How the OS will manage them? I know what a file is and what a record is but how it is distinguished in an OS?

Was it helpful?

Solution

yeap

I got the answer

A file is a collection or set of records.

Typically, In database sense, A Group of records makes a file.

A group of attributes makes a record

OTHER TIPS

These days, on Win32 and *nix at least, there is no difference. A file is just a bag of bytes to the OS, and it's left up to applications to manage and work with those bytes, either all at once or one record at a time.

The days of defining record formats and i/o sources in JCL are long gone.

Many operating systems regard files as a sequence of undistinguished symbols. There is no notion of record. Others, mainly those with a mainframe legacy, consider files to have a fixed record length and block I/O on record boundaries.

Originally, the hierarchy arose from magnetic tape drives where a physical record break was placed between blocks on a tape and sectors on a disk for partitioning a cylinder.

Today applications impose a record structure on files and access them as though there were boundaries and do not make partial accesses. This is particularly applicable to DBMS (as Manoj points out).

The record length does not need to be a constant value, but can change within a single file. They can be implemented with either explicit or implicit record lengths in files that contains multiple record types (.PNG is a good example).

In a sense, even modern OS have a preferred record size in the form of pages. These are the native blocks read from and written to the media by low-level components. This structure may need to be considered for increased performance at the margin.

The Good answer is that 1 ""A collection of related fields treated as a single unit is called a record. A collection of related record treated as a single unit is called a file or a data set""

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top