> On Saturday 14 August 2004 09:45 am, you wrote:
> > I find I have to do that anyway for lots of other reasons - SQL is
> dreadful
> > if you're trying to write platform-independent code. It's arguable
> whether
> > DBI should be attempting to eliminate all differences between these
> > databases, because ultimately it means you wouldn't be able to pass in a
> > SQL command as a string of text.
>
> Well in that case I don't think DBI is desirable. DBI is useful when only
> the
> common subset of SQL is required. Then you don't have to worry about which
> database is actually in the background. I mean, that's the main point,
> right?
Fact is that most databases differ significantly in their capabilities and
how you access them. So a product that presetns a unified view of all
database engines would be either
a) impossible, because there are databases that lack certain features (even
those that you might regard basic such as transactions)
b) or huge and complex, and this means it would take on the complexity of a
database itself (it will have to implement a lot features itself).
Typically a db engine is chosen for an application based on its capabilities
or because of company policy. In both cases you end up writing code for a
single database. IMHO the majority of db based applications only use a
single vendor's system. But I may be wrong here of course.
<snip/>
> Hmm... well there's got to be some way to identify a newly inserted
> record,
> that can be abstracted across the board. Even if it means returning a hash
> of
> the fields that uniqely identify the record. Ironically, I think there is
> an
> standard SQL statement for this, but its not well supported :(
How do you want to determine this if the database does not provide this
information? DBI can't figure it - the least it could do would be to return
the last inserted record of the current transaction or connection. But that
might be useless depending on the usage scenario. And, you could do that
yourself very easily if the information was limited to that scope.
Kind regards
robert
--
NEU: Bis zu 10 GB Speicher für e-mails & Dateien!
1 GB bereits bei GMX FreeMail http://www.gmx.net/de/go/mail
|