Re: Dabbling in plain-text databases
- From: Jerry Stuckle <jstucklex@xxxxxxxxxxxxx>
- Date: Wed, 04 Mar 2009 06:43:46 -0500
transpar3nt wrote:
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 withSpeed wise flattext can be quite fast, you will not see the difference
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.
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).
Personally, I'd keep the news in the database also, not necessarily because of write concurrency, but for backup reasons.
I try to keep anything like that which changes in a database; that way I only need to back up the files occasionally (i.e. when I change something), and can back up the database daily.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.
- References:
- Dabbling in plain-text databases
- From: transpar3nt
- Re: Dabbling in plain-text databases
- From: trookat
- Re: Dabbling in plain-text databases
- From: transpar3nt
- Dabbling in plain-text databases
- Prev by Date: Re: Parsing results of posted form?
- Next by Date: Re: obfuscating the code?
- Previous by thread: Re: Dabbling in plain-text databases
- Next by thread: fatal error on :new SQLiteDatabase
- Index(es):
Relevant Pages
|