Kumail.pk is a Free Platform of
Flat File System
Flat File System: Early databases were relatively “at”, which means they were limited to simple rows and columns, like a spreadsheet. A at le is the older version of database. It stores data in a single table structure. Flat le databases are usually in plain text format, with only one record per line. The elds included in the record are separated using delimiters such as tabs or commas.
Flat File System
Flat File System
What Is a Flat File Database?
If you ask some database administrators (DBAs) about flat file databases, they may wonder if you just told them the world was flat. That’s because flat file databases can become unwieldy and complicated. However, they have a use and a purpose, as will be detailed in this lesson.
A flat file database is a database that stores data in a plain text file. Each line of the text file holds one record, with fields separated by delimiters, such as commas or tabs. While it uses a simple structure, a flat file database cannot contain multiple tables like a relational database can. Fortunately, most database programs such as Microsoft Access and FileMaker Pro can import flat file databases and use them in a larger relational database.
Flat file is also a type of computer file system that stores all data in a single directory. There are no folders or paths used organize the data. While this is a simple way to store files, a flat file system becomes increasingly inefficient as more data is added. The original Macintosh computer used this kind of file system, creatively called the Macintosh File System (MFS). However, it was soon replaced by the more efficient Hierarchical File System (HFS) that was based on a directory structure.
A flat file database is basically a giant collection of data in which the tables and records have no relation between any other tables. In fact, one could have a single table (e.g., My Small Business Data) with everything stored in it, from customers to sales to orders to invoices.
Sound too messy? Often it is. But there are uses. One doesn’t necessarily have to normalize a database. By normalize, we mean break out all the repeating values in tables and save them into other, related tables. Sometimes simple is best.
In fact, if the data set is fairly simple, the flat file option makes more sense. A CD collection, a list of cell phone numbers, or results from a 10k could be stored in a flat file database. Even a web page or computer program could be written to interact with these types of databases; in fact, from a developer’s perspective, it would be easy to maintain.
Flat File System
Flat File Database Examples
If you have ever created an Excel spreadsheet, you have created a basic flat file! A workbook with multiple tabs makes up the database of the flat-file database; there could be many values that are the same in both worksheets, but they are not linked together.
The database table (yes, it is just a snippet from Excel) shown in the image below could be used in a small web application for a running a club:
You will notice that some names repeat; for a small table this is not that big of a deal. However, if you wanted to change the record for Dave and add a last name, you have to find all records for him and update each one.
This lesson’s author, when starting a career in information technology, was given the task of creating a database to track all printers for a given department. He generated an overly complex relational database with over 25 tables. When presented to a colleague, the colleague replied: ‘Why not just make a flat file?’ This turned out to be the simplest solution; although it was a large file, it wasn’t unwieldy and was user-friendly. Using Microsoft Access, a simple user form was created, and no special coding or updates to related tables were needed.
Relational databases use primary and foreign keys to index the data. A flat file database table can still use an index; however, it’s specific only to that table. An index is usually an auto-generated number that identifies the record number in the table, usually starting at 1. The small flat database table below has an index:
Apply for Free E-Certification