in reply to Re^2: Death and Return of TIMTOWTDI
in thread Death and Return of TIMTOWTDI

I will admit, I am not familure with the design behind DBI (haven't had the chance to check out the code), but there is also another standard SQL.

You're right - you have no idea what you're talking about. DBI and SQL have nothing to do with each other; they are orthogonal technologies. The only link between them is that they are both related to RDBMSs in some way. DBI has to do with how to physically pass messages to a given database. SQL has to do with how you ask a database a question. DBM (which is mostly unrelated) has to do with how to store information in a database. When you use DBI, you generally pass messages written in SQL.

As for CGI ... it is not God. It happens to be a piece of code that has been hacked to bits and optimized to Hell and back. It also happens to be the most used piece of Perl code ever, even more than strict. Now, if you want to roll your own CGI, go right ahead. I use a piece of hand-rolled CGI code for a specific purpose. But, don't expect others to use it. Stern does know what he's doing. (There is another node here by Ovid, I think, that discusses a code review of CGI and how it's quite amazing how unmaintainable it is.)

------
We are the carpenters and bricklayers of the Information Age.

Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

I shouldn't have to say this, but any code, unless otherwise stated, is untested

Replies are listed 'Best First'.
Re^4: Death and Return of TIMTOWTDI
by dakedesu (Scribe) on Jul 04, 2004 at 08:47 UTC

    You're right - you have no idea what you're talking about. DBI and SQL have nothing to do with each other; they are orthogonal technologies. The only link between them is that they are both related to RDBMSs in some way. DBI has to do with how to physically pass messages to a given database. SQL has to do with how you ask a database a question. DBM (which is mostly unrelated) has to do with how to store information in a database. When you use DBI, you generally pass messages written in SQL.

    So, please, master of wise archain arts. How is passing messages to a Database different from asking it questions? As I recall there are also the 'update' and 'insert' statements that do not sound like questions to me. They seem to imply commands to me.

    This post is not meant to be beillegerant, it is meant to ask a question so that I might learn more.

    -- Jamie Payne
      DBI is an API used to connect to a data source, and pass it commands. SQL is a language used to interact with a certain class of database sources. So you use DBI to send SQL to the server, if your server speaks SQL and there is a DBI driver available for it.

      Michael

        So, the API that MySQL and PostgresSQL provide to interact with their database products are considered DBI?

        This seems silly and logical both at the same time... but still par for the course in the computer world

        Of course, I never really did figure out email, which I _think_ is a similar thing (I never really figured it out), what with POP3, IMAP, MTA, MDA, STMP, DNS, and half a dozen other protocals required just to get an email from point A to point B

        (Sorry, I do not mean to be belligerent, I just challenge people's response when it doesn't make sense in hopes they answer with something to make it make sense)

        -- Jamie Payne
      When using DBI to communicate with a database, you pass messages. Those messages could be commands, questions, whatever. There are other APIs for any given database. DBI is just way of abstracting away the different ways to communicate to different databases. However, talking with an Oracle database is different from talking with a MySQL database. They have implemented the language SQL in subtly different ways.

      Every command and every question is a message. Computer programs don't make a differentiation between them. Humans do.

      ------
      We are the carpenters and bricklayers of the Information Age.

      Then there are Damian modules.... *sigh* ... that's not about being less-lazy -- that's about being on some really good drugs -- you know, there is no spoon. - flyingmoose

      I shouldn't have to say this, but any code, unless otherwise stated, is untested

        So, would SQL and DBI compliment or compete against each other? If they compliment each other, I fail to really see it in your post. If they compete against each other, well, this is a good example :)

        -- Jamie Payne