in reply to Re: Re: To DBI or not to DBI
in thread To DBI or not to DBI

Did you tested DBD::SQLite? It's not a SQL abstraction! It's a database to be embeded inside applications, to have a RDBMS in your application without the need of 3rd part applications! It has a client like MySQL, binary database files, SQL syntax and is very fast. Is very different than DBD:CSV, much more powerful!

The syntax of SQLite is not different than MySQL or any other SQL DB.

Don't confuse HDB with SQLite. SQLite is only one of the DB types that HDB can use, like MySQL and Oracle.

About the "SQL syntax is 95% the same between different SQL databases" I disagree. This "5%" can be a big problem! For example, create a table is different in most DB. The type of columns differ a lot. The SQL syntax for select in some DB have REGEXP, in others not. The NULL value is another big problem, for some is null, for others is a valid value. The INTEGER is other thing that can differ a lot, for MySQL we can chose 4 types for integer values, for SQLite 1! And this is only the begining.

But I respect your opinion, know SQL is very important, specially if you need to make complex things. But HDB still accept SQL querys: $HDB->cmd("select * from foo"); And you still can use the dbh (From DBI) interface inside it: my $sth = $HDB->dbh->prepare(...) ;

Graciliano M. P.
"The creativity is the expression of the liberty".

Replies are listed 'Best First'.
Re: Re: Re: Re: To DBI or not to DBI
by hmerrill (Friar) on Jan 29, 2003 at 17:44 UTC
    Ok, I stand corrected - I have not used or tested DBD::SQLite :-( I shouldn't have advised against using it, since I don't actually have any experience with it, and especially since my assumption about *what* it does was wrong. I'm sorry if I confused anyone with my mis-information.

    But I do stand behind my statements about using SQL in your Perl/DBI/DBD:: applications. I also agree with your view that the 5% can be a big problem. There is date/time and sequence handling, just to name a few in that 5%, and those differences are enough to give anyone headaches.

    I also have never used HDB, so I will put my tail between my legs and stop commenting before I say something wrong about that. :-)
Re: Re: Re: Re: To DBI or not to DBI
by rzward (Monk) on Jan 29, 2003 at 17:11 UTC
    Graciliano,

    I believe you are right about the SQL syntax problem. For example, in the CREATE statement, Oracle uses VARCHAR2 instead of VARCHAR. So, I'm already thinking that the CREATE statement would need to be a parameter that comes with the selected database.

    So far, it appears that the same SELECT, INSERT and UPDATE statements can be used on at least the popular databases.

    I see SQLite as a DBI driver. I see HDB as another abstraction layer. Am I wrong? I am not sure of this since I am not able to find any information about HDB. Could you provide a link?

    Thanks for your help.

    Richard