ALERT

[LAST CHANCE] Data Layer: Modern Business, Defined

Flat Database

Definition - What does Flat Database mean?

A flat database is a simple database system in which each database is represented as a single table in which all of the records are stored as single rows of data, which are separated by delimiters such as tabs or commas. The table is usually stored and physically represented as a simple text file.

Because of the limitations of flat databases, they are not unsuitable for most software applications in which there is a need to represent and store complex business relationships. However, some application developers still use flat files in order to reduce the cost and complexity of integrating a relational database.

Flat databases are also sometimes referred to as flat-file databases.

Techopedia explains Flat Database

Unlike relational databases, flat databases cannot represent complex relationships between entities. They also have no way of enforcing constraints between data. For instance in an application used by a commercial bank, it is a good idea to ensure that, at the time of creation, a new account must be linked to an existing customer. In a relational database this is easily enforced using the concept of foreign keys to ensure that customer IDs are filled in while creating an account, and also that said customer IDs already exist in another table. This is not possible with flat databases, which means that such a constraint has to be enforced by other means, such a through application code logic.

Another limitation of flat databases vis-a-vis relational databases is the former's lack of query and indexing capability. SQL queries cannot be written in flat databases because the data is not relational, and indexes cannot be created because the data is all lumped together in one table. Data in a flat database is typically only readable by and useful to the software application associated with the database.

Flat databases are, or should only be, created for small, simple databases that will never grow large enough for the limitations outlined above to really become a problem. Some real-life examples of flat databases are contact lists in a mobile phone and the storage of a high-scores list in a simple video game. In such cases, there would be little point and no justifiable expense in integrating a complex relational database engine into the computing platform because a simple flat database will do nicely.

Techopedia Deals

Connect with us

Techopedia on Linkedin
Techopedia on Linkedin
Tweat cdn.techopedia.com
"Techopedia" on Twitter


'@Techopedia'
Sign up for Techopedia's Free Newsletter!

Email Newsletter

Join thousands of others with our weekly newsletter

Resources
The 4th Era of IT Infrastructure: Superconverged Systems
The 4th Era of IT Infrastructure: Superconverged Systems:
Learn the benefits and limitations of the 3 generations of IT infrastructure – siloed, converged and hyperconverged – and discover how the 4th...
Approaches and Benefits of Network Virtualization
Approaches and Benefits of Network Virtualization:
Businesses today aspire to achieve a software-defined datacenter (SDDC) to enhance business agility and reduce operational complexity. However, the...
Free E-Book: Public Cloud Guide
Free E-Book: Public Cloud Guide:
This white paper is for leaders of Operations, Engineering, or Infrastructure teams who are creating or executing an IT roadmap.
Free Tool: Virtual Health Monitor
Free Tool: Virtual Health Monitor:
Virtual Health Monitor is a free virtualization monitoring and reporting tool for VMware, Hyper-V, RHEV, and XenServer environments.
Free 30 Day Trial – Turbonomic
Free 30 Day Trial – Turbonomic:
Turbonomic delivers an autonomic platform where virtual and cloud environments self-manage in real-time to assure application performance.