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.

Recommended Answers

All 9 Replies

what is a not flat text file?

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

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 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.

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

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.

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.

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

what is CSV?

what is CSV?

Comma Separated Values. Google it for more details.

thanks everybody for all your help and time :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.