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 -
Disadvantages of flat-file database
A list of disadvantages of a flat-file database is given below -
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 -
Step 3: Now, you can see that Microsoft access will automatically create a new table (Table1) at the left corner of the document.
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.
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.
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.
Step 7: Add another field name in the field name column and select field data type from the data type drop-down menu.
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.
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 vs. Relational database
The below table shows the difference between Flat file database and relational database -