Definition

flat file

Also see flat file system, an entirely different term. 

A flat file is a file containing records that have no structured interrelationship. The term is frequently used to describe a text document from which all word processing or other structure characters or markup have been removed.

In usage, there is some ambiguity about whether such markings as line breaks can be included in a "flat file." In any event, many users would call a Microsoft Word document that has been saved as "text only" a "flat file." The resulting file contains records (lines of text of a certain uniform length) but no information, for example, about what size to make a line that is a title or that a program could use to format the document with a table of contents.

Another form of flat file is one in which table data is gathered in lines of ASCII text with the value from each table cell separated by a comma and each row represented with a new line. This type of flat file is also known as a comma-separated values file (CSV) file.

In SQL for Dummies, an introduction to Structured Query Language, Allen G. Taylor notes that the advantage of a flat file is that it takes up less space than a structured file. However, it does require the application to have knowledge of how the data is organized within the file. By using SQL and a database (rather than a collection of files in a file system), a user or an application is free from having to understand the location and layout of data (for example, the length of each item of data, its type of data, and its relationship to other data items).

In relational databases, flat file is sometimes used as a synonym for a relation.

Contributor(s): Jack Hubbert
This was last updated in July 2006
Posted by: Margaret Rouse

Email Alerts

Register now to receive SearchSQLServer.com-related news, tips and more, delivered to your inbox.
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

More News and Tutorials

  • Database index design and optimization: Some guidelines

    What are the latest tips and tricks for database design and optimization? Check out this tip from Basit Farooq to learn more.

  • Download SQL Server Insider

    SQL Server Insider e-zine is a quarterly online publication focusing on Microsoft’s enterprise database, SQL Server. Join the editors of SearchSQLServer.com for an in-depth look into the database trends sweeping over Microsoft, including business intelligence, cloud computing and “big data.”

  • SQL Server's Data Quality Services makes cleanup a cinch

    SQL Server Data Quality Services is Microsoft’s newest data-cleansing tool. Expert Denny Cherry examines the upcoming SQL Server 2012 feature and delves into its components and processes.

Do you have something to add to this definition? Let us know.

Send your comments to techterms@whatis.com

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: