FACTOID # 123: The top five countries of origin for refugees are all in Africa.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

SEARCH ALL

FACTS & STATISTICS    Advanced view

Search encyclopedia, statistics and forums:

 

 

(* = Graphable)

 

 


Encyclopedia > Flat file database
A simple diagram depicting conversion of a CSV-format flat file database table into a relational database table. This is one of several typical uses for a flat file database.

A flat file database describes any of various means to encode a data model (most commonly a table) as a plain text file. Image File history File links FigFileConvert000a. ... Image File history File links FigFileConvert000a. ... The comma-separated values (or CSV; also known as a comma-separated list or comma-separated variables) file format is a file type that stores tabular data. ... A relational database is a database that conforms to the relational model, and refers to a databases data and schema (the databases structure of how that data is arranged). ... In relational databases, SQL databases, and flat file databases, a table is a set of data elements (values) that is organized using a model of horizontal rows and vertical columns. ... A data model is a model that describes how data are represented and used in an abstract way. ... In relational databases, SQL databases, and flat file databases, a table is a set of data elements (values) that is organized using a model of horizontal rows and vertical columns. ... Computer files can be divided into two broad categories: binary and text. ...

Contents

Flat files

A flat file is a file that contains records, and in which each record is specified in a single line. Fields from each record may simply have a fixed width with padding, or may be delimited by whitespace, tabs, commas (CSV) or other characters. Extra formatting may be needed to avoid delimiter collision. There are no structural relationships. The data are "flat" as in a sheet of paper, in contrast to more complex models such as a relational database. The term flat file can refer to a flat-file database, or to a simple type of file system for computers. ... In computer science, a database record is a description of a single item as stored in a database. ... In computer science, data that has several parts can be divided into fields. ... In typography, a typeface is a co-ordinated set of character designs, which usually comprises an alphabet of letters, a set of numerals and a set of punctuation marks. ... Delimiters are marks which are used to seperate subfields of data. ... For other uses, see white space. ... The comma-separated values (or CSV; also known as a comma-separated list or comma-separated variables) file format is a file type that stores tabular data. ... Delimiters are marks which are used to seperate subfields of data. ... A relational database is a database that conforms to the relational model, and refers to a databases data and schema (the databases structure of how that data is arranged). ...


The classic example of a flat file database is a basic name-and-address list, where the database consists of a small, fixed number of fields: Name, Address, and Phone Number. Another example is a simple HTML table, consisting of rows and columns. This type of database is routinely encountered, although often not expressly recognized as a database.


Implementation

It is possible to write out by hand, on a sheet of paper, a list of names, addresses, and phone numbers; this is a flat file database. This can also be done with any typewriter or word processor. But many pieces of computer software are designed to implement flat file databases. Mechanical desktop typewriters, such as this Underwood Five, were long time standards of government agencies, newsrooms, and sales offices. ... A word processor (also more formally known as a document preparation system) is a computer application used for the production (including composition, editing, formatting, and possibly printing) of any sort of viewable or printed material. ...


Historical implementations

The first uses of computing machines were implementations of simple databases. Herman Hollerith conceived the idea that any resident of the United States could be represented by a string of exactly 80 digits and letters—name, age, and so forth, padded as needed with spaces to make everyone's name the same length, so the database fields would "line up" properly. He sold his concept, his machines, and the punched cards which both recorded and stored this data to the US Census Bureau; thus, the Census of 1890 was the first ever computerized database—consisting, in essence, of thousands of boxes full of punched cards. Herman Hollerith (February 29, 1860 – November 17, 1929) was an German-American statistician who developed a mechanical tabulator based on punched cards in order to rapidly tabulate statistics from millions of pieces of data. ... Punched cards (or Hollerith cards, or IBM cards), are pieces of stiff paper that contain digital information represented by the presence or absence of holes in predefined positions. ... The United States Census Bureau (officially Bureau of the Census as defined in Title ) is a part of the United States Department of Commerce. ... Year 1890 (MDCCCXC) was a common year starting on Wednesday (link will display the full calendar) of the Gregorian calendar (or a common year starting on Monday of the Julian calendar). ...


Throughout the years following World War II, primitive electronic computers were run by governments and corporations; these were very often used to implement flat file databases, the most typical of which were accounting functions, such as payroll. Very quickly, though, these wealthy customers demanded more from their extremely expensive machines, which led to early relational databases. Amusingly enough, these early applications continued to use Hollerith cards, slightly modified from the original design; Hollerith's enterprise grew into computer giant IBM, which dominated the market of the time. The rigidity of the fixed-length field, 80-column punch card driven database made the early computer a target of attack[clarify], and a mystery to the common man. Combatants Allied powers: China France Great Britain Soviet Union United States and others Axis powers: Germany Italy Japan and others Commanders Chiang Kai-shek Charles de Gaulle Winston Churchill Joseph Stalin Franklin Roosevelt Adolf Hitler Benito Mussolini Hideki Tōjō Casualties Military dead: 17,000,000 Civilian dead: 33,000... For other uses, see IBM (disambiguation) and Big Blue. ...


In the 1980s, configurable flat-file database computer applications were popular on DOS and the Macintosh. These programs were designed to make it easy for individuals to design and use their own databases, and were almost on par with word processors and spreadsheets in popularity. Examples of flat-file database products were early versions of FileMaker and the shareware PC-File. Some of these offered limited relational capabilities, allowing some data to be shared between files. Application has the following meanings: In general, an application is using something general to some more conrete. ... This article is about the family of closely related operating systems for the IBM PC compatible platform. ... The first Macintosh computer, introduced in 1984, upgraded to a 512K Fat Mac. The Macintosh or Mac, is a line of personal computers designed, developed, manufactured, and marketed by Apple Computer. ... A word processor (also more formally known as a document preparation system) is a computer application used for the production (including composition, editing, formatting, and possibly printing) of any sort of viewable or printed material. ... A spreadsheet is a rectangular table (or grid) of information, often financial information. ... FileMaker Pro is a cross-platform database application from FileMaker Inc. ... Look up shareware in Wiktionary, the free dictionary. ... ĔPC-File was a flat file database computer application most often run on DOS. It was one of the first of three widely popular software products sold via the marketing method that became known as shareware. ...


Contemporary implementations

Today, there are few programs designed to allow novices to create and use general-purpose flat file databases. This function is implemented in Microsoft Works (available only for some versions of Windows) and AppleWorks, sometimes named ClarisWorks (available for both Macintosh and Windows platforms). Over time, products like Borland's Paradox, and Microsoft's Access started offering some relational capabilities, as well as built-in programming languages. Database Management Systems (DBMS) like MySQL or Oracle generally require programmers to build applications. Microsoft Works is an office suite (Home Productivity Suite) available from the Microsoft Corporation. ... AppleWorks is an office suite of software applications sold by Apple Computer. ... Borland Software Corporation is a software company headquartered in Austin, Texas. ... Microsoft Corporation, (NASDAQ: MSFT, HKSE: 4338) is a multinational computer technology corporation with global annual revenue of US$44. ... A database management system (DBMS) is a computer program (or more typically, a suite of them) designed to manage a database, a large set of structured data, and run operations on the data requested by numerous users. ... MySQL (pronounced (IPA) , my S-Q-L) is a multithreaded, multi-user SQL database management system (DBMS)[1] which has, according to MySQL AB, more than 10 million installations. ... The term Oracle database may refer either to the database management system (DBMS) software released by Oracle Corporation as Oracle RDBMS, or to any of the individual databases managed by such software. ...


Flat file databases are still used internally by many computer applications to store configuration data. Many applications allow users to store and retrieve their own information from flat files using a pre-defined set of fields. Examples are programs to manage collections of books or appointments. Some small "contact" (name-and-address) database implementations essentially use flat files.


XML is now a popular format for storing data in plain text files, but as XML allows very complex nested data structures to be represented and contains the definition of the data, it would be incorrect to describe this type of database as conforming to the flat-file model. The Extensible Markup Language (XML) is a general-purpose markup language. ...


Terms

"Flat file database" may be defined very narrowly, or more broadly. The narrower interpretation is correct in database theory; the broader covers the term as generally used. This article is about computing. ...


Strictly, a flat file database should consist of nothing but data and delimiters. More broadly, the term refers to any database which exists in a single file in the form of rows and columns, with no relationships or links between records and fields except the table structure.


Terms used to describe different aspects of a database and its tools differ from one implementation to the next, but the concepts remain the same. FileMaker uses the term "Find", while MySQL uses the term "Query"; but the concept is the same. FileMaker "files" are equivalent to MySQL "tables", and so forth. To avoid confusing the reader, one consistent set of terms is used throughout this article.


However, the basic terms "record" and "field" are used in nearly every database implementation.


Example database

The following example illustrates the basic elements of a flat-file database. The data arrangement consists of a series of columns and rows organized into a tabular format. This specific example uses only one table. For other uses, see Data (disambiguation). ... A table is a mode of visual communication that maps the logical structure of a set of data into a hierarchical matrix. ...


The columns include: name (a person's name, second column); team (the name of an athletic team supported by the person, third column); and a numeric unique ID, (used to uniquely identify records, first column).


Here is an example textual representation of the described data:

 id name team 1 Amy Blues 2 Bob Reds 3 Chuck Blues 4 Dick Blues 5 Ethel Reds 6 Fred Blues 7 Gilly Blues 8 Hank Reds 

This type of data representation is quite standard for a flat-file database, although there are some additional considerations that are not readily apparent from the text:

  • Data types: each column in a database table such as the one above is ordinarily restricted to a specific data type. Such restrictions are usually established by convention, but not formally indicated unless the data is transferred to a relational database system.
  • Separated columns: In the above example, individual columns are separated using whitespace characters. This is also called indentation or "fixed-width" data formatting. Another common convention is to separate columns using one or more delimiter characters. There are many different conventions for depicting data such as that above in text. (See e.g., Comma-separated values, Delimiter-separated values, Markup language, Programming language).
  • Relational algebra: Each row or record in the above table meets the standard definition of a tuple under relational algebra (the above example depicts a series of 3-tuples). Additionally, the first row specifies the field names that are associated with the values of each row.
  • Database management system: Since the formal operations possible with a text file are usually more limited than desired. The text in the above example would ordinarily represent an intermediary state of the data prior to being transferred into a database management system.

A data type is a constraint placed upon the interpretation of data in a type system in computer programming. ... A relational database is a database that conforms to the relational model, and refers to a databases data and schema (the databases structure of how that data is arranged). ... For other uses, see white space. ... Delimiters are marks which are used to seperate subfields of data. ... The comma-separated values (or CSV; also known as a comma-separated list or comma-separated variables) file format is a file type that stores tabular data. ... Delimited data uses specific characters (delimiters) to separate its values. ... A specialized markup language using SGML is used to write the electronic version of the Oxford English Dictionary. ... A programming language is an artificial language that can be used to control the behavior of a machine, particularly a computer. ... In mathematics, a tuple is a finite sequence (also known as an ordered list) of objects, each of a specified type. ... Relational algebra, an offshoot of first-order logic, is a set of relations closed under operators. ... In mathematics, a tuple is a finite sequence (also known as an ordered list) of objects, each of a specified type. ... A database management system (DBMS) is computer software designed for the purpose of managing databases. ...

Flat-File relational database storage model

There is a difference between the concept of a single flat-file database as a flat database model as used above, and multiple flat-file tables as a relational database model. In order for flat-files to be part of a relational database the RDBMS must be able to recognize various foreign key relationships between multiple flat-file tables. This article is about computing. ... This article is about computing. ... A relational database management system (RDBMS) is a database management system (DBMS) that is based on the relational model as introduced by E. F. Codd. ...


File1

 file-offset id name team 0x00 8 Hank Reds 0x13 1 Amy Blues 0x27 3 Chuck Blues 0x3B 4 Dick Blues 0x4F 5 Ethel Reds 0x62 7 Gilly Blues 0x76 6 Fred Blues 0x8A 2 Bob Reds 

The file-offset isn't actually part of the database, rather it is only there for clarification.


File2

 team arena Blues le Grand Bleu Reds Super Smirnoff Stadium 

In this setting, flat-files simply act as a data store of a modern relational-database, all that is needed to be a modern database are separate files supplied by the RDBMS for storing indexes, constraints, triggers, foreign key relationships, fragmentation plans, replication plans, and other modern distributed relational database concepts. A relational database management system (RDBMS) is a database management system (DBMS) that is based on the relational model as introduced by E. F. Codd. ... A distributed database is a database that is under the control of a central database management system (DBMS) in which storage devices are not all attached to a common CPU. It may be stored in multiple computers located in the same physical location, or may be dispersed over a network... A relational database is a database that conforms to the relational model, and refers to a databases data and schema (the databases structure of how that data is arranged). ...


Simple example name index on File1

 0x00000013 0x0000008A 0x00000027 0x0000003B 0x0000004F 0x00000076 0x00000062 0x00000000 

Practical Implementations

  • TextDB, a file-based database designed to handle high loads.
  • SQLite, a small C library that implements a self-contained, embeddable, zero-configuration SQL database engine.

See also

  • Flat file
  • "The Theory of the TAXIR Accessioner" by George F. Estabrook and Robert C. Brill, Mathematical Biosciences 5 (1969) pp. 327-340[1]


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.