Understanding flat files
A flat file contains all of the information in one file. We saw this example of how all of the temperature and humidity information is stored in one file. Let’s consider some formats for storing data in a flat file.
Getting to know the TXT file format
One common file format is TXT. This format represents a text file. This simply means that the file is not specially formatted, and you can read it using a bunch of tools and editors. If you are on Microsoft Windows, you can read this type of file using an application called Notepad. On Mac, you can use TextEdit. On Linux, you can use Nano, Vim, Emacs, and a host of other editors.
This file can hold any body of text without any special formatting.
Getting to know the CSV file format
Another common file format is Comma-Separated Values (CSV). It is used to store information in which the different values are separated by a comma and are all stored on one line. Every line is terminated with a...