Database files

A database file is one of the several types of the system object type *FILE. A database file contains descriptions of how input data is to be presented to a program from internal storage and how output data is to be presented to internal storage from a program.

Database files contain members and records.

Source file

A source file contains uncompiled programming code and input data needed to create some types of objects. It can contain source statements for such items as high-level language programs and data description specifications (DDS). A source file can be a source physical file, diskette file, tape file, or inline data file.

Physical file

A physical file is a database file that stores application data. It contains a description of how data is to be presented to or received from a program and how data is actually stored in the database.

A physical file consists of fixed-length records that can have variable-length fields. It contains one record format and one or more members. From the perspective of the SQL interface, physical files are identical to tables.

Logical file

A logical file is a database file that logically represents one or more physical files. It contains a description of how data is to be presented to or received from a program. This type of database file contains no data, but it defines record formats for one or more physical files.

Logical files let users access data in a sequence and format that are different from the physical files they represent. From the perspective of the SQL interface, logical files are identical to views and indexes.

Member

Members are different sets of data, each with the same format, within one database file. Before you perform any input or output operations on a file, the file must have at least one member.

As a general rule, a database file has only one member, the one created when the file is created. If a file contains more than one member, each member serves as a subset of the data in the file.

Record

A record is a group of related data within a file. From the perspective of the SQL interface, records are identical to rows.