The simplest flat file you can imagine is a text file in TXT format. It contains only written content, without any links, indexes, or formatting. The same applies to binary files, since the code is also simply written down. These files are also the basis for the simplest databases. Flat file databases fit into a single file. They are very different to complex relational databases, where the data sets have links, indexes, hierarchies, and predefined formats. Flat file databases don’t have any of these – they are the digital equivalent of a shopping list or punch card. For databases like these, a wide variety of plain text and binary formats can be used. A well-known example is CSV files (comma-separated values): information within a data set is separated from each other with commas, the data set itself is terminated with a line break – no hierarchy, just a simple list.
The advantage of flat files is their simple structure: Since the data isn’t linked, it can be created very quickly with fewer sources of error due to the low complexity. Flat file CMSs also make use of this principle and therefore offer an interesting counterbalance to the heavyweight traditional content management systems.