List:General Discussion« Previous MessageNext Message »
From:Ezequiel Panepucci Date:September 17 2007 8:27am
Subject:using column "comment" to store metadata
View as plain text  
Hi,

I'm thinking of using the "COMMENT" of columns when
creating tables to store some metadata about the
column, for instance: valid_range of numbers,
validation regexp, etc.

I did some tests with including this information as
a JSON (JavaScript Object Notation) string which can
then be easily decoded into an actual data structure
for the scripting language (Python in my case) being
used. The setup seems to work well.

One shortcoming is that the maximum size of a COMMENT
is 256 characters.

Do you have any comments about this approach?
What could possibly go very bad about relying on
this usage of the COMMENT?

I am currently using mysql 5.0.27-standard-log.

Thanks in advance for your comments,
   Cheers,
      Ezequiel
-- 
Ezequiel Panepucci
Thread
using column "comment" to store metadataEzequiel Panepucci17 Sep
  • Re: using column "comment" to store metadataMartijn Tonies17 Sep
    • Re: using column "comment" to store metadataEzequiel Panepucci17 Sep
  • Re: using column "comment" to store metadataMartijn Tonies17 Sep
    • Re: using column "comment" to store metadataEzequiel Panepucci17 Sep
  • Re: using column "comment" to store metadataMartijn Tonies17 Sep