Example of a flat file model
A flat file can be a plain text file, usually containing one record per line, or it can be a binary file. Within such a record, the singlefields can be separated by delimiters such as comma or tab characters, or may have a fixed length. In the latter case, short values may be padded with space characters. Extra formatting may be needed to avoid delimiter collision. There are usually no structural relationships between the records.
Typical examples of flat files are /etc/passwd and /etc/group on Unix-like operating systems. Another example of a flat file is a name-and-address list with the fields Name, Address, and Phone Number.
A list of names, addresses, and phone numbers written by hand on a sheet of paper is a flat file database. This can also be done with any typewriter or word processor. A spreadsheet or text editor program may be used to implement a flat file database, which may then be printed or used online for improved search capabilities.
a data warehouse or enterprise data warehouse (DW, DWH, or EDW) is adatabase used for reporting and data analysis. It is a central repository of data which is created by integrating data from one or more disparate sources. Data warehouses store current as well as historical data and are used for creating trending reports for senior management reporting such as annual and quarterly comparisons.
The data stored in the warehouse are uploaded from the operational systems (such as marketing, sales etc., shown in the figure to the right). The data may pass through anoperational data store for additional operations before they are used in the DW for reporting.
The typical ETL-based data warehouse uses staging, data integration, and access layers to house its key functions. The staging layer or staging database stores raw data extracted from each of the disparate source