[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: KDEDB (Re: Oracle support in kdedb)
From:       Reginald Stadlbauer <reggie () trolltech ! com>
Date:       2001-03-30 16:01:01
[Download RAW message or body]

On Friday 30 March 2001 01:35, Henrik Johnson wrote:
> > On Thursday 29 March 2001 17:14, David Faure wrote:
> > > On Wednesday 28 March 2001 23:49, Dan Williams wrote:
> > > > I was just starting to look at doing a DB/2 module myself.  I have it
> > > > installed on my system.
> > > >
> > > > I agree that having support for DB/2 & Oracle would be a big plus.
> > > >
> > > > On Wednesday 28 March 2001 08:15 am, Shawn Gordon wrote:
> > > > > If anyone is interested, a DB2 module would also be very cool. 
> > > > > I've got a copy of DB2 here, but we haven't had a chance to do
> > > > > anything.  I think having 2 or 3 of these high end commercial
> > > > > databases accessible via konqueror and KDE-DB would be totally
> > > > > cool.
> > >
> > > Hmm, I think that before anyone spends too much time writing
> > > kdedb plugins, it would be a good idea to reach a decision about kdedb.
> > >
> > > This discussion has started privately, but should rather be held here
>
> IMHO.
>
> > > On one hand, Qt 3 is arriving with DB support.
> > > On the other hand, we have kdedb now, but the author (Alessandro),
> > > and theKompany in general, seem to indicate that they don't intend
> > > to maintain it in the future.
> >
> > That's not completely true. ATM I have little time to do it, but I don't
>
> want
>
> > to drop it at all.
> > The question then should be the following:
> > will the forthcoming qt3 database library cover all the needs we have?
>
> Maybe
>
> > we can drop the library, but what about the ioslave and the kcontrol
>
> modules?
>
> > they can (and will, if we choose to rely on qt3 sql access) be ported to
>
> the
>
> > new architecture.
> >
> > Can someone knowing what qt3 db library will look like tell us something
> > about it?
>
> I've downloaded it and had a look at it and it seems like the Qt DB
> interface is a subset of KDE DB. You have no builtin functionality to
> browse databases and/or modify/create database objects in Qt SQL. 

That is incorrect.  It is very simple to browse the database, and 
create/modify objects or even entire databases.  For example:

         QStringList t = mydb->tables(); // get a list of all tables

         mydb->exec( "CREATE TABLE tmp (id int);" ); // create a temp table

         QSqlCursor tmp( "tmp" ); // use the temp table
         QSqlRecord* buf = tmp.primeInsert();
         buf->setValue( "id", 72 )
         tmp.insert(); // insert into the temp table

        mydb->exec( "DROP DATABASE foo;" ); // drop an entire database
         
The SQL language provides most, if not all, of the functionality required to 
manipulate a relational database.  The Qt SQL module provides  a 
database-independant API to use SQL -- with some additional classes 
(QSqlCursor, QSqlIndex, etc) which offer some convenience and standard 
behavior and algorithms.

Please have a look at the sql.html file in the documentation of the snapshots 
for an overview, examples, etc. to find out what you can do.

-- 
Reggie (reggie@trolltech.com)

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic