Other Primary File Organizations


Files of Mixed Records

In DBMS, file organizations are designed to handle records of a single type. However, in most real-world applications, multiple types of entities are interconnected in various ways. To represent relationships among records in different files, fields are connected. For example, a STUDENT record may have a connecting field Major_dept, whose value gives the name of the DEPARTMENT in which the student is majoring. The Major_dept field refers to a DEPARTMENT entity, which should be represented by a record of its own in the DEPARTMENT file. Retrieving field values from two related records requires retrieving one of the records first, then using its connecting field value to retrieve the related record in the other file. Logical field references among records in separate files implement these relationships.

Object DBMSs, as well as legacy systems like hierarchical and network DBMSs, use physical relationships realized by physical contiguity or clustering of related records, or by physical pointers, to implement relationships among records. These file organizations assign a disk area to store records of multiple types so that records of different types can be physically clustered on disk. Physical clustering of object types is used in object DBMSs to store related objects together in a mixed file.

To differentiate records in a mixed file, each record includes a record type field, which specifies the type of record in addition to its field values. This field is typically the first field in each record and is used by the system software to determine the type of record it is about to process. The DBMS can use catalog information to determine the fields of that record type and their sizes in order to interpret the data values in the record.

B-Trees and Other Data Structures as Primary Organization

In DBMS, primary file organizations can be implemented using various data structures. In addition to the ones we have discussed, some DBMSs offer the option of using a B-tree data structure as the primary file organization, provided that the record size and number of records are small enough. The B-tree data structure is typically used for indexing. Any data structure that can be adapted to the characteristics of disk devices can be used as a primary file organization for storing records on disk.

Furthermore, column-based storage has been recently proposed as an alternative method for storing relations in relational databases. This approach stores the data in a column-wise fashion, as opposed to the traditional row-wise storage.

Conclusion

In conclusion, file organizations are an important aspect of database management systems that determine how records are stored and accessed on disk. While most file organizations are designed to handle records of a single type, real-world applications often require multiple types of entities that are interconnected in various ways. To represent relationships among records in different files, fields are connected using logical field references among records in separate files.

Legacy systems like hierarchical and network DBMSs use physical relationships to implement relationships among records, while object DBMSs use physical contiguity or clustering of related records or physical pointers. In addition, various data structures can be used as primary file organizations, including B-trees, which are typically used for indexing. Column-based storage has also been proposed as an alternative method for storing relations in relational databases, which stores data in a column-wise fashion. Choice of file organization depends on the specific characteristics of the data being stored and the requirements of the application.

Updated on: 18-May-2023

106 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements