Re: [gnome-db] New project



On Sat, 2003-05-10 at 21:03, C.J. Collier wrote:
> 
> > > > > I thought that might be a way to go about it.  Does libgda cache the
> > > > > data in memory?
> > > > >
> > > > as long as the data model is not destroyed, the data is in memory. Or
> > > > are you talking about keeping it in a cache, regardless of whether the
> > > > data model has been destroyed or not?
> > > 
> > > I don't know enough about the data model or libgda to answer this
> > > question intelligently.
> > > 
> > a data model is a recordset, that is, a set of rows as returned from the
> > database.
> 
> Are these recordsets available to applications that did not make the
> request?
> 
data models are GObject's, so have the same features/restrictions than
other GObjects.

> I was thinking about passing the DSN and the request object in the
> Drag'n'Drop message.  Would this be enough to get the recordset from
> libgda?
> 
request object = SQL command? If so, yes, that would be enough. Although
note that this will make libgda re-fetch the data from the database.

I would suggest you to make a multi-process approach for this, maybe
using CORBA. Thus, you can have one process running the 'data
component', to which the other processes connect to get the data from
the database. Then, you'll have the data fetched in one place and handed
over to as many apps you want.

Maybe this would help us to re-add CORBA support to libgda.

> Would the request need to be re-executed by each client to get the
> recordset associated with a recently made request? (not necessarily made
> by this particular client)
> 
if you pass the DSN and the command to execute, yes, you'll have always
to re-execute the data.

> Does libgda present results in a way that multiple clients can access
> the result without each client having to execute the request themselves?
> 
a single copy of a data model can be used by as many clients as you
want. Just make sure you g_object_ref/g_object_unref the data model, so
that it doesn't get destroyed by error.

> When the data on disk that the data model models is invalidated (or
> updated), can libgda inform any clients that are viewing the recordset
> that an update has been made and that they should do something about it?
> 
no, libgda can't do that yet. Although it would be a very nice thing to
do. The libgda API already includes what's needed for this. We just need
to make an implementation of the notification process in the providers,
and use the modification signals mechanism in the data model to notify
users of the data model.

> I know so little about databases.  Perhaps I should read the code before
> I continue to ask questions like these.  But perhaps these should be
> added to a FAQ for those who don't read code.  Unless they're not asked
> frequently ;)
> 
well, they're not asked very frequently, so they're not FAQ :-) Although
well, I've got nothing against writing more docs for making users
happier. So if you want to prepare a document with the answers/questions
you've got, please go ahead :-)

cheers




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