On Fri, 10 Feb 2006 eain.jones / gmail.com wrote:

> Thanks Alain, Kirbybase does look like a very nice solution. It has given me
> some food for thought. I keep asking myself what a database gives me over
> XML or yaml for a simple application like mine that will only ever contain
> name value pairs or a basic extension of this format.
>
> I'd like a little info on what i will gain by using a DB. At the moment i
> see it as a lot of overhead and maybe a step to far.
>

   - concurrency

       a web enabled program means multiple users accessing the data source at
       once.  unless you are willing for one user to block all others while a
       lock is held you will corrupt the data store

   - atomicity

       transactions allow you to bundle changes into all or none operations

   - consistency

       only valid data may be wrttien.  validation data in your application is
       fine.  until another app accesses the data and hoses it.  validate in
       the db.

   - isolation

       if something from db
         then modify db

     works for multiple process at once.  each sees a view of the db that makes
     it appear as if it's the only process accessing it.

   - durability

       power failures, disk failures, etc are far less likely to corrupt your
       data.  especially since you'll have the option of hot backups

   - standards

       sql helps keep data logic out of your code.  for instance, thousands of
       reporting tools and applications will just 'work' with your data.

   - effort.  if your are talking rails it like about 1000000% times easier to
     use a db than not.

   - scalability.  if your application is good you may want to add a feature
     or users.  a db makes that possible.


some applications can definitely make use of yaml, bdb, pstore, fsdb,
kirbybase, etc.  but web aps push their limitations for sure.

regards.

-a

-- 
happiness is not something ready-made.  it comes from your own actions.
- h.h. the 14th dali lama