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

No, it only accepts SQL::Abstract, and uses it, but it doesn't produce any SQL::Abstract stuff, and doesn't add the "ALTER" statement capability to SQL::Abstract. It alters the table in the DBI directly.

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

Replies are listed 'Best First'.
Re^3: RFC: How to name it? DBIx::Table::Denormalized, DBIx::Table::Dynamic, ...
by jZed (Prior) on Sep 14, 2005 at 17:49 UTC
    Ok, but I think Alter should be in the name somewhere. "Dynamic" can mean many different things and "dynamically alter column structure" isn't the first that jumps to my mind. "Denormalized" may be one thing it does, but it sort of pre-judges how someone would use it.
Re^3: RFC: How to name it? DBIx::Table::Denormalized, DBIx::Table::Dynamic, ...
by jfroebe (Parson) on Sep 14, 2005 at 18:51 UTC

    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

      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