Explain the difference between a primary key and an alternate key in indexed file processing.
- Primary key allows duplicate values, while alternate key enforces uniqueness.
- Primary key is the default key, and alternate key is used for backup purposes.
- Primary key is used for sorting records in ascending order. Alternate key is the main key used for retrieval.
- Primary key uniquely identifies records and determines the file's physical order. Alternate key provides an alternative access path and can have duplicates.
In indexed file processing, a primary key uniquely identifies records and establishes the file's physical order. An alternate key provides an alternative access path without affecting the physical order and can have duplicate values.
Loading...
Related Quiz
- In a COBOL program, what file organization is typically used for master files in a database system?
- What is the significance of the INPUT PROCEDURE in a COBOL SORT statement?
- Advanced COBOL programmers may use the _____ construct to improve code readability and maintainability.
- In COBOL, what are the main categories of data items defined in the Data Division?
- What is the difference between a record and a structure in COBOL?