Understanding File Structures, Records, and Database Systems
File Structures and Data Management
A file, in the context of data structures, is a collection of structured information stored in secondary memory. This information is organized into units called records, all of which share the same structure and data type.
Key Concepts
- Logical Record (Record): A component of a file with a defined structure, identical for all records within the file. It represents the smallest accessible unit for reading and writing data. Record types can be fixed length, variable, or undefined.
- Data Field: The smallest unit of information within a record, represented by a set of characters. It’s the minimal piece of data that can be referenced. Field types can also be fixed length, variable, or undefined.
- Key Field: A field within a logical record that uniquely identifies the record. It’s used to locate a specific record within the file.
- Physical Record (Block): The unit of information transferred between external storage and internal memory during a single I/O operation. It can contain one or more logical records.
- Blocking Factor: The number of logical records contained within a single physical record.
Synonyms in Data Storage
Synonyms occur when different keys, after applying a processing algorithm, result in the same storage location. Since only one record can occupy a given position, a method is needed to handle synonyms. One approach involves marking free positions and using an additional field to indicate availability. This helps avoid issues during upgrades and facilitates the storage of new records. The same algorithm used for storage is also used for data retrieval.
Information Systems and Databases
An information system is a set of interconnected elements that follow specific rules. These elements provide the organization with the information needed to achieve its objectives. The system collects, processes, and stores data from both internal and external sources to facilitate retrieval, processing, and presentation.
Database Definitions
According to C.J. Date, a database is an integrated collection of stored data that supports direct access and can be shared by authorized users and programs. The data is interrelated and structured according to a model that captures its semantic content.
Another definition describes a database as an integrated data warehouse stored in non-volatile secondary storage with controlled redundancy. Data is shared by different users and applications, remaining independent of them. The database definition (structure) is stored alongside the data and supports a data model that captures interrelationships and constraints. Standardized procedures for updating and retrieval ensure data security.
Database Management Systems (DBMS)
A Database Management System (DBMS) is a set of programs that enable the deployment, access, and maintenance of a database. The DBMS, along with the database and its users, constitute the database system.