in reply to Re^2: RFC: How to name it? DBIx::Table::Denormalized, DBIx::Table::Dynamic, ...
in thread RFC: How to name it? DBIx::Table::Denormalized, DBIx::Table::Dynamic, ...

Hi,

Which DBMS's have you tried this on? I think it is a good idea for development/test environments.

Update:

hmm... This feature appears to be a variant of a "VIEW". Basically your altered table would be this as a view:

create view file_denormalized as select a.id, a.name, a.size, a.mimetype, b.playlength, b.artist, c.width, c.height from file a, mp3_properties b, image_properties c

For DBMSs that don't have support for the view, I think your module would be wonderful :)

Jason L. Froebe

Team Sybase member

No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

  • Comment on Re^3: RFC: How to name it? DBIx::Table::Denormalized, DBIx::Table::Dynamic, ...
  • Download Code

Replies are listed 'Best First'.
Re^4: RFC: How to name it? DBIx::Table::Denormalized, DBIx::Table::Dynamic, ...
by Corion (Patriarch) on Sep 14, 2005 at 18:59 UTC

    I did develop the module only on SQLite and haven't tried any other database yet. I guess that it will be fairly portable though, as I am not (yet) aware of differences between databases regarding the ALTER TABLE statement. The code currently only checks for the presence of a column and not for type differences, and it doesn't drop any columns.

    I guess your use case would be that you have a table description in your program and want to (automatically) change the production table structure to the specified structure?

      your reply made me realise that you're emulating a VIEW. :) I need more caffeine

      Jason L. Froebe

      Team Sybase member

      No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1