Good points, Will.
-----Original Message-----
From: gettingstarted-bounces at lists dot realsoftware dot com
[mailto:gettingstarted-bounces at lists dot realsoftware dot com] On Behalf Of
Will
Leshner
Sent: Tuesday, October 26, 2004 11:55 PM
To: Getting Started
Subject: Re: Multiple users writing to the same file
On Oct 26, 2004, at 9:44 PM, RBNUBE wrote:
> I'm not totally sure I understand even the basics of how databases
> work.
> I view a database as a file that is accessed by programs (be it a
> server
> or a client). The server or client accesses the database and performs
> operations on the data. This is essentially how one would use a text
> file except that the file can be opened and edited by more than one
> person at a time.
>
>
Deep down at some level, a database is just a binary file (or it could
even be a text file, but then perhaps there really isn't any difference
between a text file and a binary file except how you interpret the
bytes). If you write to the file and then I write to the file, there's
a pretty good chance I'm going to overwrite what you wrote or that I'm
going to change the state of the file out from under you. The job of a
database server is to make sure that kind of thing doesn't happen. You
can play around with lock files and such and in many cases that may be
just fine. But it isn't going to work as well as a server and it won't
be as fast. You also have to worry about stuff like what to do if the
process inside the lock dies before it can delete the lock. Who will
delete the lock and let other processes in? Servers are more than just
a fancy lock. They keep the clients from starving for data, for
example, something that's hard to control when you've just got a simple
lock that everybody has to cooperate with.
--
REALbasic database options: http://sqlabs.net
REALbasic news and tips: http://rbgazette.com
KidzMail & KidzLog: http://haranbanjo.com
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
|