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?
操作系统将如何管理它们?我知道文件是什么,记录是什么,但在操作系统中如何区分?
4 个解决方案
#1
1
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组记录会生成一个文件。
A group of attributes makes a record
一组属性创建记录
#2
1
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.
这些天,至少在Win32和* nix上,没有区别。一个文件只是操作系统的一个字节包,它由应用程序来管理和处理这些字节,一次全部或一次一个记录。
The days of defining record formats and i/o sources in JCL are long gone.
在JCL中定义记录格式和I / O源的日子早已不复存在。
#3
1
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.
许多操作系统将文件视为一系列不可区分的符号。没有记录的概念。其他人,主要是具有大型机遗留物的人,认为文件具有固定的记录长度并阻止记录边界上的I / O.
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).
今天,应用程序对文件施加记录结构并访问它们,就好像存在边界并且不进行部分访问一样。这特别适用于DBMS(正如Manoj指出的那样)。
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).
记录长度不需要是常量值,但可以在单个文件中更改。它们可以在包含多种记录类型的文件中使用显式或隐式记录长度来实现(.PNG就是一个很好的例子)。
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.
从某种意义上说,即使是现代操作系统也具有页面形式的首选记录大小。这些是由低级组件读取和写入介质的本机块。可能需要考虑这种结构以提高边际性能。
#4
0
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""
好的答案是1“”作为一个单元处理的相关字段的集合称为记录。作为单个单元处理的相关记录的集合称为文件或数据集“”
#1
1
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组记录会生成一个文件。
A group of attributes makes a record
一组属性创建记录
#2
1
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.
这些天,至少在Win32和* nix上,没有区别。一个文件只是操作系统的一个字节包,它由应用程序来管理和处理这些字节,一次全部或一次一个记录。
The days of defining record formats and i/o sources in JCL are long gone.
在JCL中定义记录格式和I / O源的日子早已不复存在。
#3
1
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.
许多操作系统将文件视为一系列不可区分的符号。没有记录的概念。其他人,主要是具有大型机遗留物的人,认为文件具有固定的记录长度并阻止记录边界上的I / O.
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).
今天,应用程序对文件施加记录结构并访问它们,就好像存在边界并且不进行部分访问一样。这特别适用于DBMS(正如Manoj指出的那样)。
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).
记录长度不需要是常量值,但可以在单个文件中更改。它们可以在包含多种记录类型的文件中使用显式或隐式记录长度来实现(.PNG就是一个很好的例子)。
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.
从某种意义上说,即使是现代操作系统也具有页面形式的首选记录大小。这些是由低级组件读取和写入介质的本机块。可能需要考虑这种结构以提高边际性能。
#4
0
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""
好的答案是1“”作为一个单元处理的相关字段的集合称为记录。作为单个单元处理的相关记录的集合称为文件或数据集“”