Hi Monks,

Before you say RTFM, read my question first ;-)

I can indeed create tables with DBI -- that's not the problem. In one of my little projects, I've been developing code that is not database specific, hence the reason for using DBI... My SELECT, INSERT, UPDATE and DELETE's are fairly standard, and work across my two database platforms (for now), but my CREATE TABLE command has some slight differences...

With the various database vendors and each with their own subtle SQL language structure, it seems that DBI is falling short on being a generic database frontend module.. Please correct me if I'm wrong, but it seems that all DBI does is provide a standard INTERFACE to the database, not a standard interface to the LANGUAGE. So if I were to write a program and allow the customer to choose his own database platform of choice, I would have to ensure that I've tested my code on all possible database platforms, and have plenty of if($dbh->{Driver}->{Name} =~ /SQLite/i) bits around my script.

Now the question... Are you aware of a method where I can create and effective manage a database by simply utilizing a standard query, which will get passed to the database in what ever customized SQL it needs?

Cheers

Massyn


In reply to How to create tables with DBI? by Massyn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.