Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Table design for application options

Re: Table design for application options

From: Neo <neo55592_at_hotmail.com>
Date: 15 Dec 2004 07:24:23 -0800
Message-ID: <1103124263.332930.85650@c13g2000cwb.googlegroups.com>


> If I have an application that has a handful of configuration options
> what is a good way to store these options in a table? e.g.
> feature_x_enabled boolean
> default_currency_symbol character
> default_currency_name string

Of your two options, a table with two columns typed as string seems more flexible. Below is an alternative method with an experimental db:

CREATE *feature.item ~in = dir;

CREATE *currency.item ~in = dir;
CREATE *dollar.cls = currency;
CREATE dollar.symbol = '$';

CREATE *app.item ~in = dir;

CREATE app.feature = +feature1;
CREATE app.feature = +feature3;
CREATE app.currency = dollar;

// Find if app has feature3
// Finds app has feature3
SELECT app.feature = feature3;

// Find the app's currency symbol
// Finds $
SELECT (app.currency=%).symbol = %; Received on Wed Dec 15 2004 - 09:24:23 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US