Re: Database design: Storing app defaults

Поиск
Список
Период
Сортировка
От Sam Mason
Тема Re: Database design: Storing app defaults
Дата
Msg-id 20080618122144.GF2572@frubble.xen.chris-lamb.co.uk
обсуждение исходный текст
Ответ на Database design: Storing app defaults  (David <wizzardx@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Karsten Hilbert
Дата:
Сообщение: Re: Database design: Storing app defaults
Следующее
От: "Albe Laurenz"
Дата:
Сообщение: Re: Controlling write access to a table