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
1
vote
4 answers

INSERTing data from a text file into SQL server (speed? method?)

Got about a 400 MB .txt file here that is delimited by '|'. Using a Windows Form with C#, I'm inserting each row of the .txt file into a table in my SQL server database. What I'm doing is simply this (shortened by "..." for brevity): while ((line =…
CptSupermrkt
  • 6,844
  • 12
  • 56
  • 87
1
vote
1 answer

Update on flat file database

For just some fun i am trying to use Flat File databases to read some data.The file used is text file and plain text format. I did design it such that there is format of storing the data for example a user record like below. stackoverflow | 12345 |…
Deeptechtons
  • 10,945
  • 27
  • 96
  • 178
1
vote
2 answers

create new array with value[1] for key and value[2] for value

i have a logfile which is saved as {time} | {name} | {value1} {time} | {name} | {value2} {time} | {name2} | {value3} {time} | {name3} | {value4} the {time} is a timestamp in "Seconds since the Unix Epoch" and the logfile is written line by line so…
DJ-P.I.M.P
  • 105
  • 2
  • 6
  • 15
1
vote
1 answer

active users script, user count not working properly

i have written a script to output active users on my site.... part of this is counting unique ips in the log, as the array i use to split the lines / data unloads active users from the array list after 5 minutes..... however the "3 online users now"…
DJ-P.I.M.P
  • 105
  • 2
  • 6
  • 15
1
vote
1 answer

Storing text of indefinite length, word by word, as it's being written

I would like to write some plain text that is of indefinite length, and may eventually reach 10,000+ words. At any point others can see the progress of the text, page by page. The text need not be editable once it has been written. Would I be better…
Tom
  • 927
  • 3
  • 12
  • 20
1
vote
3 answers

search within array for last 7 occurrences

I am writing a php code to search for different variables in a text file.... The data is listed line by line in a flatfile and the format for data listing is: date | time | ip | geo-location (city) | //url The data is saved as a logfile…
DJ-P.I.M.P
  • 105
  • 2
  • 6
  • 15
1
vote
2 answers

Logging/Emailing skipped records in SSIS Package

Using SQL 2008 R2, I've created an SSIS Package that rips through a flat file and imports them into a SQL table. If any record in the data file does not contain all the required fields, that record should be skipped in the import process. All…
tjans
  • 1,503
  • 2
  • 16
  • 26
1
vote
3 answers

What's the best flat-file format to hold structured data?

I have data with 5 different fields (combination of ints, strings, and large strings) and I'd like to hold it in some sort of flat file container. I have tens of thousands of such entries but I don't have a need for any sort of database (at all,…
oxuser
  • 1,257
  • 2
  • 16
  • 23
1
vote
2 answers

how to properly secure form - flat file database

My form saves user inputs (inputs+textarea) into a flat file database. I found lots of examples Googleing on how to create a flat file database, but no one is properly covering some good basics on how to properly secure form from XSS and other…
Ginnani
  • 325
  • 1
  • 5
  • 19
1
vote
2 answers

Flatfile Management in PHP

What are the restrictions on the length of a flatfile db? How are the number of entries on a flatfile page controlled?
Webiter
  • 119
  • 1
  • 10
1
vote
2 answers

Pass Value/Variable to Dtsx /SET \Package.Variables[User::NameVariable];"value" ERROR

I want pass a value to ssis package, but i have an error back I execute with batch, the command dtexec /F "c:\MyPackage.dtsx" /SET \Package.Variables[User::Valore].Properties[Value];2 This is the error (warning) : C:>dtexec /F…
user1043030
  • 13
  • 1
  • 1
  • 3
1
vote
7 answers

Prevent Multiple Entries using PHP

Presented alongside a polling facility on a webpage is the following input fields that enables the visitor (voter) to enter their details in a raffle for a hamper as a reward for their effort in taking part in the poll. The raffle entry form script…
Webiter
  • 119
  • 1
  • 10
1
vote
3 answers

Mapping a flat text file

In a text file, lines are detected by \n at the end of each line. For this purpose, it is necessary to read the entire file, and this is a big problem for large files (say 2GB). I am looking for a method to read a single line without walking through…
Googlebot
  • 15,159
  • 44
  • 133
  • 229
1
vote
1 answer

How to parse Flat File Schema to mulesoft object

I have requirement where I need to parse MuleSoft Flat File Schema to parse incoming file content, input file row to parse it and convert to Mule object. It should include parsing of multiple rows in a file with 5-7 attributes per row. I have seen…
Avinash
  • 19
  • 6
1
vote
2 answers

Can you delimit rows and columns by pipe in SSIS?

From SSIS, I need to send an Excel file in the format of; 656265 | 56280212 || 654581 | 56246894 || 656111 | 56281475 || I currently have a package that generates an Excel file to be displayed as; 656265 | 56280212 654581 | 56246894 656111 |…