Re: More stupid database tricks
From: Paul <paul_at_see.my.sig.com>
Date: Wed, 03 Aug 2005 14:55:08 +0100
Message-ID: <a4j1f1prbrn6maevkbksem1lf85be0held_at_4ax.com>
Date: Wed, 03 Aug 2005 14:55:08 +0100
Message-ID: <a4j1f1prbrn6maevkbksem1lf85be0held_at_4ax.com>
"David Cressey" <david.cressey_at_earthlink.net> wrote:
> <silly>
>
> 27. We tried classic schemas, but change management of the schema was just
> too difficult. Here's what we do, instead:
>
> We store everything inside a single table, with just four columns, named
> object_id, attribute_id, type_code, and string_val. The primary key is
> object_id, attribute_id.
>
> Whenever we need to know the value of an attribute, we just look it up in
> the table, and then cast the string_val according to the type_code.
>
> Now our metadata is just as flexible as our data. And the programmers love
> it!
> </silly>
I saw a critique of this approach (the one table fits all method) somewhere on the internet.
Paul...
-- plinehan __at__ yahoo __dot__ __com__ XP Pro, SP 2, Oracle, 9.2.0.1.0 (Enterprise Ed.) Interbase 6.0.1.0; When asking database related questions, please give other posters some clues, like operating system, version of db being used and DDL. The exact text and/or number of error messages is useful (!= "it didn't work!"). Thanks. Furthermore, as a courtesy to those who spend time analysing and attempting to help, please do not top post.Received on Wed Aug 03 2005 - 15:55:08 CEST