From: Julian F. <ju...@be...> - 2003-08-26 23:35:28
|
Rodney Holm wrote: > I was thinking of one relation ( table ) per enumeration, and then > another relation for global configuration items. > > for example: > > relation 'severity' { > id, > description > } > > relation 'config_inc' { > hostname, > username, > password, > db_name, > etc... > } > > Just add a new relation for each enumeration. I was thinking more in terms of config options like the notification levels that are array-based data as opposed to those which are just lists. But in either case, how would you see the API looking for a page to get at these config options though? Do you have a special function for each one that know where to look stuff up, etc? The nice thing about serializing it is that you can still ask for the value of the config option and get back the array you always used to get. The config interface can still get that array out, display it, let you modify it, and serialize the modified array back in for the new value. I realize it's pretty unclean from a DB point of view and I'm not suggesting it's necessarily the right way to go - it just seems like the simplest way to maintain our nice simple config_api while letting us move the data into a declarative storage format. Julian |