[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:       Henrik Johnson <hpj () globecom ! net>
Date:       2001-03-30 22:27:06
[Download RAW message or body]

> 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.

Well that is all true, except that you can't create/drop that kind of 
stuff database independent. MySQL and Oracle (The ones I know well) have 
different syntax for creating tables, and also droping tables is 
different since in oracle you have schemas which you don't have in MySQL. 
This functionality is provided with kdedb, what can later on be moved out 
of kde db is the actual DB access. I'm pretty sure you can't do this in 
Qt since the database driver interface has no methods for and I know it's 
database dependent.

/Henrik Johnson
GlobeCom AB

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

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