in reply to RFC: How to name it? DBIx::Table::Denormalized, DBIx::Table::Dynamic, ...
Why not simply create a table "properties", with three fields: id, key and value?
You can decide yourself which propertise are important enough for in the File table, but I'd just put almost all in Property, for ease of programming:File Property .id .id .name .file .size .key .type .value
This, with the glue to make it automatic in Perl (which you could even do with AUTOLOAD), seems much easier to me, and can work with non-mysql databases.File Property .id .id .name .file .type .key .size .value .parent File id name type size parent 1 ROOT DIR NULL NULL 42 foo FILE 123 1 Property id file key value 9 42 content_type image/x-xyzzy 10 42 width 1024 11 42 height 768 13 42 bpp 16
Growing tables horizontally automatically is a crime, as much as having indexes in table or column names is.
Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: RFC: How to name it? DBIx::Table::Denormalized, DBIx::Table::Dynamic, ...
by Corion (Patriarch) on Sep 15, 2005 at 15:29 UTC | |
by Juerd (Abbot) on Sep 15, 2005 at 18:51 UTC | |
by Corion (Patriarch) on Sep 15, 2005 at 21:34 UTC |