Flat File database

A Flat file database is also known as the text database. It is the most important type of database used to store data in a plain text file (MS Excel). Flat file databases were developed by IBM in the early 1970s.

In the Flat file database, each line of the plain text file holds only one record. These records are separated using delimiters, such as tabs and commas. The advantage of a flat-file database is that it is easy to understand and helps us to sort the results easily.

Advantages of Flat file database

A list of advantages of a Flat file database is given below -

  1. All records are stored in one place.
  2. Easy to understand and configure using various standard office applications.
  3. It is an excellent option for small databases.
  4. It requires less hardware and software components.

Disadvantages of flat-file database

A list of disadvantages of a flat-file database is given below -

  1. Flat file database is harder to update.
  2. Harder to change data format.
  3. It is poor database in terms of complex queries.
  4. It increased Redundancy and inconsistency.

Create a flat-file database

For small businesses, a flat-file database is the best way to manage the data.

There are the following steps to create a flat-file database -

Step 1: Open Microsoft Access.

Step 2: Microsoft Access Home page will appear on the screen, in which do the following -

  1. Click on the Blank database option in the Available Templates section.
  2. Type database name in the File Name text box.
  3. Browse the location where you want to save the database.
  4. Click on the Create button, as shown in the screenshot below.
Flat File database

Step 3: Now, you can see that Microsoft access will automatically create a new table (Table1) at the left corner of the document.

Flat File database

Step 4: To create your own table, Click on the View tab and click on the Design view option from the View drop-down menu.

Flat File database

Step 5: A small pop-up menu will appear in which enter the table name that you want to create and click on the OK button.

Flat File database

Note: In our case, we are going to create an Employee table.

Step 6: An Employee table design view will appear with the columns Field Name, Data Type, and Description.

To make a field primary key, right-click on the field you want to make as a primary key and select the Primary key option from the drop-down menu, or you can simply click on the Primary key tab to make a filed as a primary key.

Flat File database

Step 7: Add another field name in the field name column and select field data type from the data type drop-down menu.

Flat File database

Note: Similarly, you can add more Field names and data types in your table.

Step 8: Once you add all desired Field names in the table, click on the View tab at the top of the document and click on the Datasheet View option from the View drop-down menu.

Flat File database

Step 9: The following window will appear with your desired Fileds names. Enter the required data in the Fields names and click on the Save option to save your flat-file database.

Flat File database

Flat file database vs. Relational database

The below table shows the difference between Flat file database and relational database -

Flat file databaseRelational database
Flat file database is used to store data in a single table structure.Relational database is used to store data in a multiple-table structure.
Flat file database can be accessed by a variety of software applications.Relational database uses a Relational Database Management System (RDBMS) to access the data.
Flat file database includes software like FileMaker, Berkeley DB, and Borland Reflex.Relational database includes software like Oracle, MySQL, and PostgreSQL.
It is simple, portable, easy to use, and inexpensive.It is more powerful and more efficient than the Flat file database.
It is represented using a Data dictionary.It is represented using a Schema.
It contains files, records, characters, and fields.It contains the entity's attributes and relationships.
In a Flat file database, there is a problem of data redundancy.In a Relational database, there is no problem with data redundancy.
It is less secure.It is more secure than the Flat file database.
Mostly, small organizations use the flat file database.Mostly, large organizations use a relational database.





Latest Courses