[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] proposal for dbapi base class

From: Horst Herb
Subject: Re: [Gnumed-devel] proposal for dbapi base class
Date: Tue, 21 Jan 2003 00:13:36 +1100
User-agent: KMail/1.4.3

On Mon, 20 Jan 2003 23:50, Karsten Hilbert wrote:
> > class dbapi:
> The naming is perhaps a bit unfortunate.

Yes. Was just to illustrate what it is about

> What is this to wrap ? 1:1 onto tables ? In which case
> it could be named "dbtable".

NOT a table. A concept, like a "patient" which is made up by many tables. The 
whole point of our dbapi is to get away from the table complexity

> methods as generic as they are now, eg:
> >     def fetch(self, pkey):
> >             """fetch the record as identified by the primary key pkey.
> >             The record can then be accessed via class attributes"""
> >             raise PureVirtualFunction

In order to fetch data, you need an unique identifier - the primary key. This 
primary key may or may not be identical with the one of one of the underlying 
tables - but in any case: no fetching without primary key, no matter what you 

> The conceptual idea of this method does loose a lot of
> flexibility as Ian points out.

Why? If you ant the full flexibility, stick to SQL. If you want comfort, use 
the API.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]