Re: Thoughs after discussions at OSCON

From: "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>
To: Rick Morris <rick(at)brainscraps(dot)com>
Cc: pgsql-advocacy(at)postgresql(dot)org
Subject: Re: Thoughs after discussions at OSCON
Date: 2005-08-16 21:59:02
Message-ID: 20050816215901.GM5928@pervasive.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy

On Tue, Aug 16, 2005 at 11:22:05AM -0400, Rick Morris wrote:
> Still, the hard work is in parsing constraint definitions. The
> information_schema tables/views make this information more accessible,
> but still, there is a certain amount of crazy reverse-engineering one
> needs to do. It would be nice eventually for the pgsql modules of any
> language to be able to derive this information, for example, starting
> with the pg_meta_data() function in PHP (http://php.net/pg_meta_data).

http://pgfoundry.org/projects/newsysviews/ might make that task a bit
easier.

> >So far, the best solution I've seen is the XML-based 'datadef' that a
> >friend of mine created at a former job. It was database-centric enough
> >so that it could drive the entire database creation process (including
> >triggers, stored procs, etc) and do it well, while also creating
> >application code (C/C++ in this case). Since it was XML/XSLT based it
> >was pretty easy to add new features, and more importantly, it could
> >support any programming language out there. Everything else I've seen is
> >tied to a specific language, which is a big downside. Unfortunately, he
> >never wanted to release it to the community because he felt the
> >implementation was ugly.
>
> I know the feeling ;).
>
> That approach has merit, but one possible drawback: the developers/DBAs
> might circumvent the datadef and make database design changes directly
> on the DB. Then your application is hosed. I much prefer to develop
> something that allows the application layer to react automatically to
> changes in the database design. (I know that is never *completely*
> possible, but at least in the area of basic constraints and datatypes it
> would be nice)

Very true. Fortunately I've been able to keep that kind of tweaking on
production systems to an absolute minimum everywhere I've worked; the
XML datadef file was the defacto standard for what was in the database.
--
Jim C. Nasby, Sr. Engineering Consultant jnasby(at)pervasive(dot)com
Pervasive Software http://pervasive.com 512-569-9461

In response to

Browse pgsql-advocacy by date

  From Date Subject
Next Message Josh Berkus 2005-08-17 00:54:54 Compliment from the Database Hacker's Handbook
Previous Message Robert Treat 2005-08-16 19:05:39 Re: Publishing and PostgreSQL