954,483 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

what is really a flat text file?

im a total newbie and i dont get this:

i dont get this flat text file my professor is talking about. I read from wikipedia that:
A "flat file" is a plain text or mixed text and binary file which usually contains one record per line[2] or 'physical' record (example on disc or tape). And i dont get it.

Then my professor said:
shingles technique assumes the input is a flat text file. Parse trees and symbol tables are generally not flat text files.

so what's that? what is a not flat text file?

i really need help on this. please help me. enlighten my mind.

stakeMyHeart
Newbie Poster
23 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
 
what is a not flat text file?


CSV is an example of a flat file. XML is an example of a non-flat file.

Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 

A flat file is a file that contains a set of records. The records are normally seperated from each other by a space, a comma, or a new line. You could export a spreadsheet file to a comma seperated list i.e. a text file where every item is seperated by a comma. You can reasd this type of file with a text editor

A not flat file is a file where the records are organized with an index (this is a simplified explanation). The index will then point to the actual location of the record. You would normally need some application like a database management system to read this type of file.

vadriaan
Light Poster
33 posts since Jul 2010
Reputation Points: 7
Solved Threads: 2
 

A flat file is a file that contains a set of records. The records are normally seperated from each other by a space, a comma, or a new line. You could export a spreadsheet file to a comma seperated list i.e. a text file where every item is seperated by a comma. You can reasd this type of file with a text editor

A not flat file is a file where the records are organized with an index (this is a simplified explanation). The index will then point to the actual location of the record. You would normally need some application like a database management system to read this type of file.


A non-flat file can also be a structured file, such as indicated by Narue's mention of XML as such an example. Indexes are not necessary for such.

rubberman
Posting Virtuoso
1,564 posts since Mar 2010
Reputation Points: 277
Solved Threads: 179
 

A flat text file could have an index too. You can't be too strict about these sorts of definitions.

Rashakil Fol
Super Senior Demiposter
Team Colleague
2,658 posts since Jun 2005
Reputation Points: 1,135
Solved Threads: 177
 
A flat text file could have an index too. You can't be too strict about these sorts of definitions.


True enough. I worked on MCBA manufacturing accounting software years ago that used flat files for the database, along with indexes to speed random access to the data.

rubberman
Posting Virtuoso
1,564 posts since Mar 2010
Reputation Points: 277
Solved Threads: 179
 

The presence of an index in a flat file confused me, so here is what Wikipedia has to say:
Strictly, a flat file database should consist of nothing but data and, if records vary in length, 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.

vadriaan
Light Poster
33 posts since Jul 2010
Reputation Points: 7
Solved Threads: 2
 
CSV is an example of a flat file. XML is an example of a non-flat file.

what is CSV?

stakeMyHeart
Newbie Poster
23 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
 
what is CSV?

Comma Separated Values. Google it for more details.

Narue
Bad Cop
Administrator
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401
 

thanks everybody for all your help and time :)

stakeMyHeart
Newbie Poster
23 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: