Skip to Content.
Sympa Menu

internetworkers - Re: [internetworkers] cheap database

internetworkers AT lists.ibiblio.org

Subject: Internetworkers: http://www.ibiblio.org/internetworkers/

List archive

Chronological Thread  
  • From: "Michael D. Thomas" <mdthomas AT mindspring.com>
  • To: <internetworkers AT lists.ibiblio.org>
  • Subject: Re: [internetworkers] cheap database
  • Date: Mon, 30 Dec 2002 21:52:48 -0500

> > and does anyone know of a cheap way to create a database without
> > using an actual database (eg. mySQL)?

> Try XML

I agree. You can use XML in conjunction with XSLT to generate the (X)HTML.

As long as you aren't doing a lot of updates to the list of books, then you
should be fine. In the braindead implementation, you risk loosing data if two
people are trying to update the XML in the exact same instant. You can get
around this in a variety of ways -- just start by choosing
a good locking strategy. The common ones are optimistic and pessimistic
locking. In the pessimistic strategy, you prevent any attempt at modification
if someone is currently modifying the page. Hardcore. In the optimistic
strategy, you reject any modification that would accidentally discard data.
This case comes up when User B slips in after User A has began the update and
User B commits a change before User A has completed their change. You reject
User A's change b/c it would overwrite User B's change.

Or just handle all the updates yourself and don't tell anyone else how to
update.

(You'd think that once you upgrade to a SQL DB solution that these locking
issues would just go away, but nooooooooooooooooo! Your favorite DB has
features to help you with adopting a particular strategy, but the stateless
nature of HTTP renders techniques such as Oracle's "Select For Update"
ill-advised.)

The XML solution is also nice b/c it gives you a good upgrade path to a DB
solution. Most of the databases give you a way to generate XML based on a SQL
query. Then you just throw away your code that loads the XML off of the
filesystem and replace it with code that issues a SQL query and returns the
reponse formatted as XML.






Archive powered by MHonArc 2.6.24.

Top of Page