What are flat file and relational databases
Some problems that can arise with their use include the possibility of duplication and the difficulty of keeping records unique. This can lead to wasted storage and levels of inefficiency. Furthermore, it can be difficult to make changes in the format of the data entered, and in the retrieval of any data requiring multiple queries.
Relational databases were developed to get past the limitations inherent in a simple flat file. While a flat file contains only a single table, a relational database stores data in multiple tables, consisting of columns of key values and stored values, enabling the possibility of relating one table to another.
Relational databases require a structure to contain them, referred to as a server, in order to store and to interpret data. They also depend on specific tools to view and to interpret the information contained in them.
In relational databases, information is stored in a randomized manner, only to be organized on retrieval. As opposed to flat files, relational databases can address more dynamic queries. Designing a relational database takes more planning than flat file databases. With flat files, you may add information, as you deem necessary.
With relational databases, you must be careful to store data in tables such that the relationships make sense. Building a relational database is dependant upon your ability to establish a relational model. The model must fully describe how the data is organized, in terms of data structure, integrity, querying, manipulation and storage. Relational databases allow you to define certain record fields, as keys or indexes, to perform search queries, join table records and establish integrity constraints.
Search queries are faster and more accurate when based on indexed values. Table records can be easily joined by the indexed values. Integrity constraints can be established to ensure that table relationships are valid. If you are able to establish a one-to-many relationship in your data tables, you should be using a relational database because a flat file is not sufficient to handle your data processing needs.
Relational databases offer more robust reporting with report generators that filter and display selected fields. These pointers, called linked lists in many approaches, are difficult for the developer to maintain. Any time someone adds information to the database, the pointers have to be updated to show the next piece of information and the previous set of information. The management of these pointer updates is challenging for database developers when working with legacy flat file technology.
Relational databases do not use flat file approaches. Instead, relational databases focus on storing information efficiently for the operating system and database package. This is separate from the emphasis on providing a means for easy information retrieval from the system.
Data can be accessed or organized in different ways without the need to make accompanying changes to the tables. A flat file is like a large container of all your data, similar to a single table where you store all the data. The data can be structured in nature consisting of multiple rows and columns with each column corresponding to an attribute. For example, a single record can be written into the flat file as multiple data items delimited with space or comma.
A CSV file is a good example of a flat file to store records as an in the case of an email list.
0コメント