Re: Standard DBI Proposal



tom.rmadilo wrote:
Notice the example I gave above. Most of what you do in your example
is also handled completely behind the scenes. In other words, you
define parameters ahead of time, including whether it is required, a
default to use, the type, and for strings a length (because database
chars usually have max lengths). So, on a separate page you define
what a query is and the associated params. Then you can reuse the
query anywhere. Here is the setup page (with still a lot of the magic
hidden behind):

I don't think what you wrote is incompatible with what I wrote. Just so
wildly different as to be irrelevant. :-)

I'm talking about a framework that lets you deal with making SQL queries
(including inserts, updates, deletes, table definitions, etc.) to a
database without having to deal with the low-level nitty-gritty business
of quoting, results management, etc. I'm not talking about connecting
that basic framework to the Web or stuff like that[*]; it was just an
illustrative example to emphasize why leaving the quoting to the
interface layer is better. (Programmers are lazy, and so forget to do
things like quoting. Better to let the mandatory parts take up the slack
so you can slack off! :-)) My explicit goal is to make it so that users
of the database interface get it right because that is the path of least
resistance. Having SQL be just another embedded language is another
explicit goal (just as C is with critcl). But defining what others do
with the DBI is a Non-Goal.

Donal.
[* Ye gods! No! ]
.



Relevant Pages

  • Re: OOP - a question about database access
    ... > difficult to do this when the structure of the database has ... but only in the interface layer. ... the data access to one or some separate objects whose methods can be ... that return the data in a form that is needed by the business objects. ...
    (comp.object)
  • Re: Max Exchage DB size in SBS
    ... private) rather than total. ... The stores grow as necessary to house their content, ... the database will grow by 100mb. ... becomes "slack" in the database. ...
    (microsoft.public.backoffice.smallbiz2000)
  • Re: Anyone ever consider a filesystem served by MySQL for mail folders?
    ... >whose contents are served by a MySQL database? ... But as for increased storage requirements, ... handling of quoting among messages in a thread. ... --John W. Gardner and Francesca Gardner Reese ...
    (freebsd-questions)
  • Re: TDBC documentation, examples, syntax?
    ... if you're using TDBC to access a database, ... do quoting right and instead let TDBC do it for you. ... Oracle, unlike MySQL, doesn't want quotes around numbers. ... paradigms when you change database? ...
    (comp.lang.tcl)
  • Re: OOP - a question about database access
    ... difficult to do this when the structure of the database has ... So we try to keep the two very separate. ... but only in the interface layer. ... we have objects that suit the application. ...
    (comp.object)