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
3
votes
4 answers

Ruby: start reading at arbitrary point in large file

I have some log files I would like to sift through. The content is exactly what you expect in a log file: many single lines of comma separated text. The files are about 4 gigs each. File.each_line or foreach takes about 20 minutes for one of…
mikewilliamson
  • 24,303
  • 17
  • 59
  • 90
3
votes
3 answers

Why does it add the text at the beginning of next line, and not the end of the right one?

Needed solution: I am working with a simple PHP script that should: Add "value4:::" at the end of the first line in a file Add ":::" at the end of all the next lines I am novise in programming, and have sit here for two days trying to figure this…
Preben
  • 1,277
  • 2
  • 11
  • 20
3
votes
1 answer

GPROF flat profile empty result

I'm trying to use gprof (I have to use gprof - no other option is available) when I get the flat file the result is empty even though everything works fine. By the way, the code is in c so I'm using gcc. Result: Each sample counts as 0.01…
RedHood148
  • 429
  • 2
  • 4
  • 14
3
votes
3 answers

What's the best way to organize data on my embedded system?

I haven't done much programming for Embedded Systems before, and now I have to create some scripts for something relatively tiny (<60MB RAM, almost all of which is already used by other more critical processes, the processor is less ~ 500MHz). I…
Dan Carlson
  • 996
  • 1
  • 12
  • 18
3
votes
7 answers

Appropriate data structure for flat file processing?

Essentially, I have to get a flat file into a database. The flat files come in with the first two characters on each line indicating which type of record it is. Do I create a class for each record type with properties matching the fields in the…
Jim
  • 11,229
  • 20
  • 79
  • 114
3
votes
1 answer

Using Google Cloud Dataflow for merging flat files and importing into Cloud SQL

We have to read data from CSV files and map two files with respect to one column and push data to Cloud SQL using Google Cloud Dataflow. We are able to read data from CSV files but stuck with the next steps. Please provide me information or links…
3
votes
2 answers

find and replace values in a flat-file using PHP

I'd think there was a question on this already, but I can't find one. Maybe the solution is too easy... Anyway, I have a flat-file and want to let the user change the values based on a name. I've already sorted out creating new name+value-pairs…
peirix
  • 36,512
  • 23
  • 96
  • 126
3
votes
2 answers

android SQLite vs Flat Files

im creating a game right now and im a bit stuck on how to implement storage of levels. i need to be able to download level files from the internet ota. im not so familiar with transferring files ota, but i have some experience with databases…
mixm
  • 531
  • 2
  • 4
  • 18
3
votes
1 answer

Flatfile Datatype Issue with SSIS to SQL Server

Loading a flatfile to SQL Server via SSIS. I have few Columns with DATE datatype in SQL Server Destination table. What should be the corresponding datatype to be defined in connection manager in SSIS? I tried all the DATE datatype available in the…
WiredTheories
  • 231
  • 7
  • 18
3
votes
1 answer

Tilde (~) Delimited File Read in SSIS

I'm trying to load a Tilde (~) delimited .DAT to SQL Server DB using SSIS. When I use a flat file source to read the file, I don't see the option of a ~ delimiter. I'm pasting a row from my file below: 7318~97836: LRX PAIN MONTHLY DX~001~ALL OTHER…
Triumph Spitfire
  • 663
  • 15
  • 38
3
votes
1 answer

Import small number of records from a very large CSV file in Biztalk 2006

I have a Biztalk project that imports an incoming CSV file and dumps it to a database table. The import works fine, but I only need to keep about 200-300 records from a file with upwards of a million rows. My orchestration discards these rows, but…
SqlRyan
  • 33,116
  • 33
  • 114
  • 199
3
votes
1 answer

Fastest way to store & retrieve translated text - database or flat file?

I am working on upgrading our site to work in different languages. My plan is to store paragraphs of text in multiple languages and give each paragraph an identifier. Example id => '1' brief => 'welcome_paragraph' en => 'Welcome to our website!' de…
Jon M
  • 454
  • 1
  • 7
  • 20
3
votes
2 answers

EDI File to pipe delimited flat file

I'm looking for any helpful links or advice on translating an incoming EDI 940 (X12) to a (|) Pipe delimited flat file in c#.net
djshortbus
  • 359
  • 1
  • 4
  • 11
3
votes
5 answers

Advice: building a non-database driven simple CMS in PHP

I'm working on a site which requires a very simple CMS - basically there's a block of text on the homepage that needs to be editable by the client. Their current hosting plan doesn't allow for a database, and including one will cost an extra $X a…
pingu
  • 614
  • 1
  • 10
  • 23
3
votes
2 answers

Complex Flat Files in SSIS

SSIS is great at handling flat files where all the records are the same, but not so good when there is a little complexity. I want to import a file similar to this - Customer: 2344 Name: John Smith Item Description Price …
Craig Schwarze
  • 11,367
  • 15
  • 60
  • 80