Quantcast
Channel: Software, Business & Technology Innovation » Databases
Viewing all articles
Browse latest Browse all 7

Flat-File Databases – Simple but Limited Database Solutions

$
0
0

‘Flat files” are described as a plain or mixed texts and binary files with normally only a single record per line or can also be ‘physical’ record a such as a tape or disc.
Flat-file databases (DBs) are very basic types of data storage tools in DB and CMS systems used for creating lists on mobile phones or as storage of a high-scores list in a simple video game. They are ideal for small data amounts that needs to be human readable or edited by hand.
Flat file databases are also used as data transfer tools to remote servers although they get more and more replaced by XML (Extensible Markup Language) files which not only contain but also describe the data.

Normally, flat-file data are split up using a common delimiter which can be simple as a comma separated value text file (CSV file). More complex strings use tabs, new lines or characters not likely to be found in the record itself (delimiters) to separate delimiters with all records being stored as single rows of data.

Several flat-files can be combined to equal some of the behaviors of a relational database but are in general much slower in practice: for example, using a relational database allows access to all the tables within a database while using the flat file database approach would result in opening a new file open for each table. Essentially they are just composed of strings of a single or some more files which can be parsed to get the information they store.

Thus, flat-file databases are great for storing simple data values and simple lists but a challenge to work with when data structures get more complex. Additional formatting may be required to avoid delimiter collision and moreover, SQL queries cannot be written in flat databases because the data is not relational, indexes cannot be created and data is all pulled together in one table which makes it easily unusable.
In addition, flat-file databases are less good scaleable and they are very prone to corruption because there is no built-in locking mechanism that documents file usage and modification compared to other database models.

Because of their limitations, flat databases are not best fitting for many software applications. However, they may still be used in less complex applications because of their low development cost and to bypass the complexity of integrating relational databases.


Viewing all articles
Browse latest Browse all 7

Trending Articles