Search Postgresql Archives

Re: Database design: Storing app defaults

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux