1,105,447 Community Members

what is really a flat text file?

Member Avatar
stakeMyHeart
Newbie Poster
23 posts since Oct 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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.

Member Avatar
Narue
Bad Cop
12,139 posts since Sep 2004
Reputation Points: 5,693 [?]
Q&As Helped to Solve: 1,537 [?]
Skill Endorsements: 81 [?]
Team Colleague
 
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.

Member Avatar
vadriaan
Light Poster
37 posts since Jul 2010
Reputation Points: -1 [?]
Q&As Helped to Solve: 3 [?]
Skill Endorsements: 0 [?]
 
1
 

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.

Member Avatar
rubberman
Senior Poster
3,999 posts since Mar 2010
Reputation Points: 513 [?]
Q&As Helped to Solve: 501 [?]
Skill Endorsements: 87 [?]
 
0
 

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.

Member Avatar
Rashakil Fol
Super Senior Demiposter
2,596 posts since Jun 2005
Reputation Points: 982 [?]
Q&As Helped to Solve: 209 [?]
Skill Endorsements: 42 [?]
Team Colleague
 
0
 

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

Member Avatar
rubberman
Senior Poster
3,999 posts since Mar 2010
Reputation Points: 513 [?]
Q&As Helped to Solve: 501 [?]
Skill Endorsements: 87 [?]
 
0
 

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.

Member Avatar
vadriaan
Light Poster
37 posts since Jul 2010
Reputation Points: -1 [?]
Q&As Helped to Solve: 3 [?]
Skill Endorsements: 0 [?]
 
0
 

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.

Member Avatar
stakeMyHeart
Newbie Poster
23 posts since Oct 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

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

what is CSV?

Member Avatar
Narue
Bad Cop
12,139 posts since Sep 2004
Reputation Points: 5,693 [?]
Q&As Helped to Solve: 1,537 [?]
Skill Endorsements: 81 [?]
Team Colleague
 
0
 

what is CSV?

Comma Separated Values. Google it for more details.

Member Avatar
stakeMyHeart
Newbie Poster
23 posts since Oct 2011
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

thanks everybody for all your help and time :)

Question Answered as of 2 Years Ago by Narue, rubberman, vadriaan and 1 other
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: