DB design document

David Merrill dmerrill@lupercalia.net
Sat, 16 Dec 2000 04:11:38 -0500


On Sat, Dec 16, 2000 at 02:15:21AM -0500, James LewisMoss wrote:
> >>>>> On Thu, 14 Dec 2000 13:23:55 -0500, David Merrill <dmerrill@lupercalia.net> said:
> 
>  David> On Thu, Dec 14, 2000 at 12:11:35PM -0600, Bill Gribble wrote:
>  >> On Thu, Dec 14, 2000 at 12:47:08PM -0500, David Merrill wrote:
>  >> > Well this is a good time. As soon as I understand how they work
>  >> > together I'll see how it might be achieved in the db.
>  >>
>  >> It probably won't happen before you are finished with your
>  >> first-round spec, so don't wait on that.  Just be aware that your
>  >> database schema will probably have to change at some point in the
>  >> future.  My guess is that it won't be a real holdup given the
>  >> significant restructuring of much of the gnucash code that will be
>  >> necessary to implement a database backend, anyway.
> 
>  David> I disagree. One of the difficulties with databases is that it
>  David> is much, much harder to refactor that just about any other
>  David> kind of programming.  We should make a valiant effort to
> 
> I'm not disagreeing, but I'm curious what in your mind makes it harder
> to refactor?

I'm not sure I can tell you all the reasons it's harder, but I'll try
to give you an idea. From many years of client-server development, it
seems that refactoring the database has consistently been the most
painful, tedious aspect of any project.

At my current job, for example, we have a full time dba whose sole job
is shuffling data in and out of tables, massaging it, and putting it
back into new tables when they have been refactored. Even a single
field name change requires this.

With GnuCash developers working against cvs, they would all be doing
this crap. Can you imaging all of you having to shuttle your data
around like this? You folks would not like me much, I'm sure.

And just try adding a new constraint on a table where the data doesn't
fit the new constraint. On users' installations. Talk about nightmare
installation scripts, and if one goes bad...

*shudders*



*faints away*



-- 
Dr. David C. Merrill                     http://www.lupercalia.net
Linux Documentation Project                dmerrill@lupercalia.net
Collection Editor & Coordinator            http://www.linuxdoc.org
                                       Finger me for my public key

Let My worship be in the heart that rejoices,
For behold--
All acts of love and pleasure are My rituals.
		-- from The Charge of the Goddess, Doreen Valiente