On Feb 4, 2008 10:46 AM, Satya Prasad <[EMAIL PROTECTED]> wrote:

> Well sorry for not providing enough info but we got to download a file and 
> process it. Hence DBMS is out of question. Further more then we would require 
> a process to read, parse and insert into DB. It wouldn't be possible to hold 
> lock and commit for every record.

Breaking the file into more managable parts may be helpful. But still,
editing in place really isn't ideal, it's safer to read data in,
process and write back out to a second file.

However, I also think using the right tool for the job is a wise
decision... and doing this in C may not be ideal. Personally, for this
kind of text processing, I'd be using Perl (I wrote such a Perl script
just last week, in fact, for processling large log files generated by
a server).

> Regards,
> Prakash
>
>
> ----- Original Message ----
> From: Brett McCoy <[EMAIL PROTECTED]>
> To: [email protected]
> Sent: Friday, February 1, 2008 6:46:35 PM
> Subject: Re: [c-prog] Inser record in text file
>
>
> On Feb 1, 2008 3:58 AM, Satya Prasad <satya_prakash_ [EMAIL PROTECTED] com> 
> wrote:
>
> > Yes, I agree but is it possible using a single file manipulation. The other 
> > way I understand is that I create a temp file and write modified data there 
> > or read st.st_size (file size) and re-write the whole modified data. But 
> > then assume I have 5 million of data there for processing and memory 
> > allocation fails ... (the only help is see is call brk()) or split the file 
> > to a limited size and do processing.
>
> If you have 5 million rows of data you should be using a DBMS.
>
> -- Brett
> ------------ --------- --------- --------- --------- --------- -
> "In the rhythm of music a secret is hidden;
> If I were to divulge it, it would overturn the world."
> -- Jelaleddin Rumi
>
>
>
>
>
>       
> ____________________________________________________________________________________
> Never miss a thing.  Make Yahoo your home page.
> http://www.yahoo.com/r/hs
>
> [Non-text portions of this message have been removed]
>
>
>
> To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.
> Yahoo! Groups Links
>
>
>
>



-- 
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
    If I were to divulge it, it would overturn the world."
               -- Jelaleddin Rumi

Reply via email to