


Once you've done that, LOAD DATA INFILE is very fast! Here's an example statement for importing a CSV (Comma Separated Values) file: You have to create the database and table(s) first, but you only need to do that once for each data set. For example, MySQL provides the LOAD DATA INFILE statement. If the structure of a flat file database sounds familiar to you, it's because it is very similar to a CSV (Comma Separated Values), TSV (Tab Separated Values), or any DSV (Delimiter Separated Values) file.Įvery relational database provides its own command(s) for importing data from a flat file. However, relational databases provide commands to import flat file databases and use them in a larger relational database. Unfortunately, most relational database clients cannot connect directly to a flat file database. If you have some programming savvy, you can find ODBC drivers for most languages for interfacing with flat file databases. Their simple structure takes up less space than structured database files and work well for configuration data.

Due to their simple structure, the "tables" represented within a flat file database support limited functionality, such as record and column sorting.įlat file databases flourished as a back-end to applications. As such, flat file databases share more commonality with a spreadsheet than a relational database. They are a type of database that stores data in a plain text file, whereby each line of the file holds one record, and fields are separated by delimiters - typically commas or tabs. In fact, if you use any of Navicat's database development and admin clients, you're in the ideal position to do so! History and Limitationsįlat file databases have been around ever since the very first computers. As we'll learn in today's blog, there is a better way to work with flat file databases than in years gone by. Flat file databases are indeed a real thing, but they don't get much love these days. While you've almost certainly heard of relational and NoSQL databases, there is a better than even chance that you're completely unfamiliar with flat file databases. What is a Flat File Database? by Robert Gravelle
