Difference Between a Flat File and a Database File

TIME : 2016-01-07
Difference Between a Flat File and a Database File

A flat file is the simplest possible structure: records stored as plain text, one per line, with fields separated by delimiters. There are no relationships between records and no enforcement of what goes in each field, which makes flat files easy to read and easy to corrupt.

A database file is stored on a server in a format the database engine itself controls, and it is registered in the database catalogue so the engine knows how to interpret it. Structure, types and relationships are all defined and enforced, which is what allows queries, indexing and multi-user access to work at all.

The short version: a flat file is data with no rules attached, while a database file is data wrapped in a great many rules that make it useful at scale.