Re: Database design: Storing app defaults

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Database design: Storing app defaults
Date: 2008-06-18 12:20:07
Message-ID: 20080618122006.GD4010@merkur.hilbert.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jun 18, 2008 at 02:03:05PM +0200, David wrote:

> If I want to start providing user-customizable defaults to the
> database (ie, we don't want apps to update database schema), is it ok
> database design to add a table2 record, with a NULL table1_id field?
>
> In other words, if table1 has no matching table2 record, then the app
> will use the table2 record with a NULL table1_id field to get
> defaults.
Or have a trigger on table1 transparently fetching defaults
when necessary.

Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sam Mason 2008-06-18 12:21:44 Re: Database design: Storing app defaults
Previous Message Karsten Hilbert 2008-06-18 12:18:07 Re: Database design: Backwards-compatible field addition