Why use a DBMS instead of storing data in files?
Assesses fundamental understanding of DBMS conventions, runtime behavior, and memory/performance considerations.
Hiring managers look for precision, avoidance of ambiguous jargon, and ability to explain trade-offs under real production conditions.
A file system stores bytes in files and directories but knows nothing about their structure. A DBMS adds a layer that understands records, types, relationships and constraints, and coordinates concurrent access.
Key advantages of a DBMS:
- Structured queries through SQL, including joins and aggregation, without hand-written parsing code.
- Integrity: primary keys, foreign keys, checks and transactions keep data consistent.
- Concurrency control: many users and transactions read and write safely with isolation guarantees.
- Recovery: write-ahead logging and backups restore a consistent state after a crash.
- Security: fine-grained privileges, roles, auditing and views.
- Abstraction and independence: applications are less coupled to physical storage.
app -> SQL -> DBMS -> storage engine -> disk
A plain file approach can be simpler and faster for tiny or single-writer workloads, such as logs or configuration. But once you need multi-user concurrency, complex queries or crash safety, reimplementing those features in application code is far more error-prone.
Candidate Response Strategy & Interview Tips
- Start with a concise one-sentence summary: Deliver a direct, confident answer first before expanding into nuances.
- Demonstrate real-world trade-offs: Discuss where this approach excels and when you would avoid it in production systems.
- Discuss complexity & edge cases: Proactively explain time/space complexity or boundary conditions (null values, scale limits).
- Prepare for interviewer follow-ups: Technical hiring panels frequently probe deeper into concurrency, backward compatibility, or alternative libraries.