|
Posted by Jerry Stuckle on 10/21/38 11:53
Manish wrote:
> Hi Jerry Stuckle, the project specifies not to use database, otherwise
> it would have been definitely much easier. I have to store all the
> information in the file itself. Thanks for bringing into atention that
> whatever, seperator with least probbability of occurence is chosen, it
> can occur in subject line. May be we should use some escape character
> for it. As it is used in mailbox file. Every new mail starts with "From
> ", but if it's in the message itself, it's replaced by ">From ". I will
> also look into the CSV format for storing the data.
>
>
> Hi Andy Jeffries, we are using PHP 5, so sprintf/fprintf can be used. I
> haven't come across using pointers in PHP. I will definitely try to
> learn it.
>
>
> Hi ImOk, our initial datastructure was in the XML format itself,
> (individual XML file for every user). As there can be thousands of
> email, the file will grew larger and reading/writing may be slow/error
> prone. So it was suggested to use text file.
>
> -----------------------------------------------------------------------------------------------------------------------------
> This is how the datastructure is
> -----------------------------------------------------------------------------------------------------------------------------
<snip>
> -----------------------------------------------------------------------------------------------------------------------------
>
> But the other setting will still be in XML file.
>
> We are using SimpleXML functions (get values, update values), DOM
> (insert). Still the delete functionality is not working. We are
> thinking of implementing preg_replace() for it.
>
> Thanks.
>
> Manish
>
Manish,
If the problem is speed, a flat file isn't going to help you that much
more. You'll still have to encode and decode the data, no matter which
format you use. And even if it's faster now, all you're doing is
delaying the inevitable. You definitely need a database.
If it were me, I'd go back to them and explain why they need a database.
But I'm only a consultant...
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|