Advantages & Disadvantages of Flat File Databases

Techwalla may earn compensation through affiliate links in this story. Learn more about our affiliate and product review process here.

Create a flat file database to store simple information on a computer. A UNIX or Linux operating system runs on a series of flat file databases. A Windows computer also uses flat file databases to store information which is used every day. A Macintosh computer also does this. But a flat file database is not relational, and cannot satisfy Edgar F. Codd's thirteen rules that define the relational nature of databases. There are distinct advantages and also disadvantages to the flat file database.

Advertisement

Flat Files For Storing Configuration Simply

The Windows Registry, however complex, is not relational. It is a flat file which expands and contracts as software and hardware get added and removed. It keeps track of user data, stores logs and helps find information very quickly. Passwords are stored by UNIX and Linux in a flat file database along with configuration information which is easily editable, and which makes the system function. Any changes to these UNIX configuration files cause instant effects which can be dramatic. A lot of this is what makes UNIX so popular because of its ease of configuration.

Advertisement

Video of the Day

Flat File Database Advantages

A flat file database is a one record per line text file, a binary file (or a combination of both text and binary) file which separates columns by using "delimiters" which separate the fields in a standard recognizable way. This helps in searching through records for information. Records can also be delimited by fixed length. If a record is too short, some form of field-padding can be used so that the length of the record is the same as the next. This allows for a uniform byte-length from one field to the next.

Advertisement

Configuration files are often stored in XML (Extended Markup Language), which is a flat file database with some quite specific delimiters, such as "greater than" and "less than" (<>) symbols. These XML files are often used to build specific modules on a website, when the standard build follows a very specific pattern that is configured by a single value stored in an XML file, or a series of related values.

Advertisement

Flat File Database Disadvantages

Databases accessed on a network share are useful for access by many people who are looking for information. Flat file databases are not usually accessed like this since they belong with offline entities and form the machinery of operating systems and local devices. Also, there are no transactions in a flat file database, so it is limited in what it can actually do as a database entity. So a flat file database is disadvantageous to a network user, who is accessing a multi-access, multi-tasking relational online database which can be viewed from many different aspects.

Advertisement

Advertisement

Expert Insight

Flat file database files are not encountered as "databases," but more as configuration files and the machinery which drives UNIX and Linux. Also, these files are part of the file construct of more than one type of mobile application. These files are incredibly useful and the concept can be used in all areas of software applications and in the maintenance of complex small devices such as mobile computers. Even websites are built with these files. These are not the areas of disadvantage. However, there are applications which rely on different constructs and demand different interaction. These kinds of application are better served with a relational approach to file-storage. Whole applications can be built using Access databases and SQL Server databases. The flat file database has no place here.

Advertisement

Significance

Many software applications are created with flat file databases. A new operating system could be designed using a set of flat file databases. They appear in all areas of information technology. Their significance is likely to remain high for the foreseeable future.

Advertisement

Advertisement

references

Report an Issue

screenshot of the current page

Screenshot loading...