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

From Sam Mason
Subject Re: Database design: Storing app defaults
Date
Msg-id 20080618122144.GF2572@frubble.xen.chris-lamb.co.uk
Whole thread Raw
In response to 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?
>
> 2) Have a new table, just for defaults, like this:
>
> table2_defaults
>  - field1
>  - field2
>  - field3

Without knowing anything else about the problem, this is probably what
I'd do.  The fact that the shape of the table is very similar to the
table specific defaults is only incidental.  The main reason I'd do this
is because it's solving a different problem, that of providing global
defaults vs. table specific defaults.

I'm not sure how you'd get all the types to match up, but then again
this whole scheme of providing defaults seems a little alien to anything
I've done before.


  Sam

pgsql-general by date:

Previous
From: Karsten Hilbert
Date:
Subject: Re: Database design: Storing app defaults
Next
From: "Albe Laurenz"
Date:
Subject: Re: Controlling write access to a table