Flat File

A flat file database is a database that stores its contents in a single table. Most flat file databases are formatted as plain text files — each line containing a separate record, and fields separated by delimiter characters like commas or tabs. Most flat file databases are relatively small due to their simple structure, but very large flat file databases may be used when only a single table is needed.

Unlike relational databases, which contain multiple tables that link to and reference each other, flat file databases store all of their data in a single table. This makes flat file databases poorly suited for complex data structures like a store's inventory database, but still useful for storing simple information like a contacts list. Since flat file databases are plain text, their contents are limited to text and numbers. Text in a flat file database must also be formatted properly so that commas or tabs within the database do not accidentally split fields.

A flat file database stores its data in a single table
A flat file database stores its data in a single table

Since flat file databases are plain text with simple delimiter characters, they are often used as intermediate files when transferring data between two applications. Comma-separated value (CSV) files are the most common, often used by spreadsheet applications like Microsoft Excel to export data in a non-proprietary file format. They are also widely used by applications to store data internally, often for configuration data.

Updated June 1, 2023 by Brian P.

quizTest Your Knowledge

What was the final version of Apple's "OS X" operating system?

A
10.11
0%
B
10.12
0%
C
10.13
0%
D
10.14
0%
Correct! Incorrect!     View the OS X definition.
More Quizzes →

The Tech Terms Computer Dictionary

The definition of Flat File on this page is an original definition written by the TechTerms.com team. If you would like to reference this page or cite this definition, please use the green citation links above.

The goal of TechTerms.com is to explain computer terminology in a way that is easy to understand. We strive for simplicity and accuracy with every definition we publish. If you have feedback about this definition or would like to suggest a new technical term, please contact us.

Sign up for the free TechTerms Newsletter

How often would you like to receive an email?

You can unsubscribe or change your frequency setting at any time using the links available in each email.

Questions? Please contact us.