Re: Dabbling in plain-text databases



On Mar 3, 6:12 pm, trookat <troo...@xxxxxxxxxxxxx> wrote:
transpar3nt wrote:
Hey all, I am working on a basic project mostly to play around with
plain-text databases (and if they're worth using in lieu of sql).  It
will be sort of a video game fansite, that will have a news page (news
articles all text-based, that part I have working perfectly).  My
question is what do you guys know about the performance and
reliability of using a plain text db to keep track of users?  Is
parsing a file like that any faster or slower than using MySQL?

I know there can be access collisions (if that's what they're called)
and I found a good script for avoiding that (http://us2.php.net/manual/
en/function.flock.php#87181).

Whatever you think would be helpful.

Speed wise flattext can be quite fast, you will not see the difference
between a getfilecontents and using sqlite. Mysql can be slower if you
host's msyqlserver is overworked, but usually you won't see the difference.

I used flat text for years on my site, using filelock detection while
writing to the file. But In my case only 5 people had access that could
write to the site, reducing any chances to multi-writes to almost nothing..

flat text has it's place in many reads , few writes  situations. However
you will need to write all the sorting tools yourself.And when writing
you often have to write the entire file over again if remove or edit an
entry.

An sql based database is better for situations requiring  better
multi-posting and you get better tools for reading/updating/deleting
entries.

I have moved entirely to sqlite which took alot of relearning how to
structure a database.moving to mysql won't be as painful since the
method of manuplating the data is basicly the same.

flattext for small site data , conf settings etc
sql database for major data

regards
trookat

thanks for your responses, pretty much what I expected to hear. it
was just a simple curiosity to see how valid an idea it was. I will
probably keep my main news page as flat files since only 1 or 2 people
will have write access, and users and file upload/download info I will
convert to MySQL (which I do have some experience with).
.



Relevant Pages

  • Re: Can databases form automatic calculations?
    ... Basically I would like to know if there is some way to get a database ... All my product sales are ... Anyone know the MySQL function syntax for this if it is possible? ... The user interface is the SQL language which can be invoked ...
    (comp.databases)
  • DBConvert for MS SQL & MySQL 2.1.0
    ... DBConvert for MS SQL & MySQL is a database migration tool for data ... MySQL server directly. ...
    (comp.software.shareware.announce)
  • Re: Can databases form automatic calculations?
    ... Basically I would like to know if there is some way to get a database ... All my product sales are ... Anyone know the MySQL function syntax for this if it is possible? ... The user interface is the SQL language which can be invoked ...
    (comp.databases)
  • Re: Can databases form automatic calculations?
    ... Basically I would like to know if there is some way to get a database to ... by examining the relevant fields in the "Sales" table. ... Anyone know the MySQL function syntax for this if it is possible? ... The user interface is the SQL language which can be invoked directly from ...
    (comp.databases)
  • Re: Dabbling in plain-text databases
    ... will be sort of a video game fansite, that will have a news page (news ... Mysql can be slower if you host's msyqlserver is overworked, but usually you won't see the difference. ... An sql based database is better for situations requiring better multi-posting and you get better tools for reading/updating/deleting entries. ...
    (comp.lang.php)