comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Ada DB bindings and APQ
Date: Tue, 14 Dec 2004 20:45:47 +0100
Date: 2004-12-14T20:45:47+01:00	[thread overview]
Message-ID: <txi92gifdvm7$.23cfemkygevu.dlg@40tude.net> (raw)
In-Reply-To: cpnbds$p3r$1@a1-hrz.uni-duisburg.de

On Tue, 14 Dec 2004 18:29:16 +0000 (UTC), Georg Bauhaus wrote:

> Dmitry A. Kazakov <mailbox@dmitry-kazakov.de> wrote:
>: On Tue, 14 Dec 2004 02:25:22 -0500, Warren W. Gay VE3WWG wrote:
>: Yep, the first error one gets: lpq not found. libpq.a is not distributed
>: with GNAT. This might become a problem in the future.
> 
> I'm not at all surprised that when I use a binding but not the bound
> thing, I'll get an error.

Does your OS complain about all devices you could potentially attach via
USB?

>: Yes, but from user's perspective, at least one query per connection is
>: always necessary. In some cases the user will need more, but not so often.
> 
> I doubt this very much. Indeed, we have a server type application
> that does not work at all without a connection pool, because performance
> is affected rather drastically when you control connections.

OK, but this does not contradict my point.

> This is at least true for the DB systems we have had a chance to try.
> 
> If then you want one physical connection to play the part of a
> "reusable" connection that is not in the way of programmers,
> then why do you need one at all in the abstraction?
> For example, how about ticket based query authentication?

Sounds as an implementation detail to me, elaborate.

>: I do not see much sense in all that levels of types exposed to the user.
> 
> As a user, I agree that a DWIM DB abstraction is wonderful.
> It just isn't practical when using current database technology :-)

I still do not see any real advantage in separating query and connection.
It would be no problem to have both multiple physical connections and
multiple physical queries without exposing them.

Maybe within the hierarchy: transaction / server, it makes sense to
distinguish both, but separating query /connection makes no sense to me. 

>: Internally of course. This could be necessary for "light-weight" connection
>: cloning.
>: 
>: Handle --> Query_Object --> Connection_Object
>: 
>: 1. Handle copy (+1 reference count of Query_Object)
>: 2. Light-weight copy: creates new query (+1 reference count of connection)
>: 3. Heavy-weight copy: creates a new query and a new connection
> 
> This starts looking like optimazation techniques used in current
> database systems.

So, you agree? (:-))

>: My case is much simpler. The application
>: starts, it checks if DB exists, if not, it creates that empty.
>: I believe,
>: this is about 80% of needs for small applications.
> 
> Aha! So your goal is to have a convenient abstraction for
> a specific kind of data storage in small applications?

Sure. For a large application, DB will almost certainly be fixed in the
requirements. Forget it. But!

Do it [right] for small things first. Then you will see how quickly it will
eat that large players. PCs vs workstations (or cockroaches vs humans, if
you want (:-)), lessons to learn!

>: Anyway, there should be a uniform way of putting values into requests
>: separated from SQL-keywords, and, probably, names of tables, of columns
>: etc.
> 
> This again sounds like a newly designed Ada-interface based OO data storage
> system for Ada programs...

That's not OO, yet. It is rather typed vs untyped.

> Go ahead :)

Let's see (:-))

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2004-12-14 19:45 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-12 17:42 Ada DB bindings and APQ Dmitry A. Kazakov
2004-12-14  7:25 ` Warren W. Gay VE3WWG
2004-12-14 17:37   ` Dmitry A. Kazakov
2004-12-14 18:29     ` Georg Bauhaus
2004-12-14 19:45       ` Dmitry A. Kazakov [this message]
2004-12-14 21:06         ` Georg Bauhaus
2004-12-15  8:19           ` Ole-Hjalmar Kristensen
2004-12-15 17:20           ` Dmitry A. Kazakov
2004-12-16 13:28             ` Georg Bauhaus
2004-12-17 13:23               ` Dmitry A. Kazakov
2004-12-14 23:26         ` Brian May
2004-12-15 17:43           ` Dmitry A. Kazakov
2004-12-15 21:54             ` Brian May
2004-12-15  4:05     ` Warren W. Gay VE3WWG
2004-12-15 18:26       ` Dmitry A. Kazakov
2004-12-16  2:53         ` Warren W. Gay VE3WWG
2004-12-18 16:43           ` Dmitry A. Kazakov
2004-12-18 20:36             ` Warren W. Gay VE3WWG
2004-12-18 22:21               ` Dmitry A. Kazakov
2004-12-19  0:53                 ` Warren W. Gay VE3WWG
2004-12-19 12:21                   ` Dmitry A. Kazakov
2004-12-20  5:33                     ` Warren W. Gay VE3WWG
2004-12-20 20:01                       ` Dmitry A. Kazakov
2004-12-20 20:54                         ` Warren W. Gay VE3WWG
2004-12-14 22:40   ` Brian May
2004-12-15  3:23     ` Warren W. Gay VE3WWG
2004-12-15 15:01       ` Georg Bauhaus
2004-12-17  4:31         ` Brian May
2004-12-15 10:48   ` Brian May
2004-12-16  1:40     ` Brian May
2004-12-16  3:10       ` Warren W. Gay VE3WWG
2004-12-17  4:55         ` Brian May
2004-12-17 11:13           ` Warren W. Gay VE3WWG
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox