Re: Database design: Storing app defaults - Mailing list pgsql-general

From Karsten Hilbert
Subject Re: Database design: Storing app defaults
Date
Msg-id 20080618122006.GD4010@merkur.hilbert.loc
Whole thread Raw
In response to Database design: Storing app defaults  (David <wizzardx@gmail.com>)
Responses Re: Database design: Storing app defaults  (David <wizzardx@gmail.com>)
List 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

pgsql-general by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: Database design: Backwards-compatible field addition
Next
From: Sam Mason
Date:
Subject: Re: Database design: Storing app defaults