Re: Conf: argue !
"Wim Niemans ri" <[email protected]>
| Newsgroups | gmane.comp.lib.binarycloud.devel |
|---|---|
| Organization | Pb Solo |
| Message-ID | <421E7D7F.8549.2DF0D88@localhost> |
On 23 Feb 2005 at 0:22, Manuel Holtgrewe wrote:
> > Trees aren't that hard, but I agree that in this case they seem excessive.
Anyway, it is important to remember that the structure of the
config_variables is a hierachy, and multi-dimensional arrays of
variables must be allowed.
> They are bad and ineffective in SQL because
>
> - The implementation of the relational model SUCKS
> - There is the need for a generic "EXPLODE" command to get a tree from
> the table rows (tuples) within the database.
Config_values form a tree. Trees are hierarchies and by-default hard to
implement in a relational model because they don't adhere to that.
Implementation is ergo a flat table. No harm done.
You don't need an explode at all, though it can be done with that:
From current code of Conf:, method get(path):
$assign='return $this->domains'."['".str_replace('/',"']['",$path)."'];";
return eval($assign);
A similar construction is used to transform the tree (row by row) into an
multiple associative array. The eval is used too to transform php-
constants and others in raw format into string_values and arrays.
wim niemans
>
> But we all know that my attitude to SQL is a bit biased ;)
>
> Manuel
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe-zNu2Yekbks92Brm55YPRC3dfcadvtA/[email protected]
> For additional commands, e-mail: dev-help-zNu2Yekbks92Brm55YPRC3dfcadvtA/[email protected]
>
>