Questions tagged [flat-file]

A flat-file database model is any system using a single file for storage with one record per line, usually plain-text or text mixed with binary data.

A "flat file" is a plain text or mixed text and binary file which usually contains one record per line or 'physical' record (example on disc or tape). Within such a record, the single fields can be separated by delimiters, e.g. commas, or have a fixed length. In the latter case, padding may be needed to achieve this length. Extra formatting may be needed to avoid delimiter collision. There are no structural relationships between the records.

Typical examples of flat files are /etc/passwd and /etc/group on Unix-like operating systems. Another example of a flat file is a name-and-address list with the fields Name, Address, and Phone Number.

Source: Wikipedia (Flat file database)

830 questions
-2
votes
2 answers

How would I store JSON data in a flat file database?

I need to store some data in a JSON file. I know how to use json_encode but I can't find any information on how to write the encoded data into an external file. Here's a pice of code that prints out the encoded data, but how can I write the data in…
Pixel
  • 101
  • 2
  • 11
-3
votes
1 answer

How to achieve concatenate the records from flat file?

I have two codes in the text file( 001 & 002) if row starts with 002 code the row amount should be added with the next 001 code row amount. The sequence should be repeated for each 001 code row. means every 001 code row amount should be the sum with…
gopim
  • 35
  • 6
-3
votes
1 answer

SQL to flat-file export

I working on a report where I have my query in SQL and the query result is to be exported to a flat file. -- This is a daily job and every day the result is exported to a new flat file (Name of the flat file & date :…
Sinred
  • 13
  • 4
-3
votes
1 answer

Numerically sorting a php .txt file

I'm trying to create a scoring system using flat file (I know, I'd prefer to use mysql too). I have managed to create enough so that the variables are pulled out of the game (username and score) and put into said text file. I can also output this…
-5
votes
2 answers

What are the advantages and disadvantages of using a database over plain files?

I couldn't find the advantages and disadvantages of using a database over plain files. Would you please help me?
Johanna
  • 27,036
  • 42
  • 89
  • 117
1 2 3
55
56