File operations in DBMS

December 4, 2026 · Team EasyExamNotes · 2 min read (est.) · 0 comments

Share on WhatsApp

← RGPV CS-502 DBMS December 2020 solved question paper

CS-502 (CBGS) | December 2020 | Q6(a) | 7 marks

Question (restated): Describe operations performed on database files.

Answer

A database file stores records on secondary storage. The file manager provides operations for accessing and modifying these records while coordinating with the buffer manager and storage allocation mechanisms.

Creation allocates storage and initializes file metadata. Opening establishes a handle and access mode; closing releases resources. Reading retrieves records or pages, either sequentially or by an address or index. Searching locates records matching a key or predicate. Insertion adds records to available space or allocates new pages. Deletion marks space reusable or removes records and updates indexes. Updating changes record values and may relocate a variable-length record if it no longer fits.

Sequential scanning processes records in order and is useful for reports or bulk processing. Random access retrieves a particular page directly. Sorting reorganizes records by a key, often using external merge sort when data exceeds memory. Merging combines sorted files. Reorganization compacts fragmented storage or rebuilds indexes. Truncation removes file contents while deletion removes the file itself, subject to database rules.

For example, inserting a student record requires locating free space, writing the record, updating the relevant index and recording recovery information. A subsequent lookup by roll number may use the index rather than scan the whole file. Deleting the record must also remove or invalidate index entries.

File organization influences operation costs: heap files favor inexpensive insertion, sorted files favor ordered scans, and hash files favor equality searches. Database operations must preserve integrity and transaction semantics; direct operating-system file edits can bypass these safeguards. The buffer manager reduces physical I/O by caching frequently accessed pages.

Further reading: Silberschatz, Korth and Sudarshan, Database System Concepts.

← RGPV CS-502 DBMS December 2020 solved question paper

Discussion

Ask a question, share your thoughts or report an error.

Sign in to participate in the discussion.

Join the discussion