String lengths in the SQL backend

Keith A. Milner maillist at superlative.org
Thu Nov 20 04:26:48 EST 2008


On Wednesday 19 November 2008 15:33:13 Derek Atkins wrote:

> Having said that, we shouldn't rule out users accessing the data
> out from under GnuCash, at least in a read-only means.  I still
> believe that external tools should not be writing data into the
> GnuCash database.

I totally agree with this.

A database schema should not be confused with an API. It's a common mistake 
and I've lost count of the times I heard people say "they both use Oracle" 
when discussing application integration, the assumption being that because 
two applications happen to share the same database system they will 
automatically integrate with each other.

The reality is application database schemas change and often for good reason. 
They should not be 100% relied on even, arguably, for reading. Writing to a 
database used by an application is very likely to break things badly unless 
you know what you are doing. If you know what you are doing you might do it 
by hand as an expedient to fix a specific problem but automated tools or 
external applications writing to an application's database is a recipe for 
disaster.

I know it is possible to mitigate against this by careful applications of 
views, use of stored procedures and so on to create a database layer API, but 
this is the wrong way to do it. If you are going to commit the time and 
energy to create an API, it should really be independent of the application's 
own data storage.

Cheers,

-- 
Keith A. Milner


More information about the gnucash-user mailing list