KDb/About KDb: Difference between revisions

From KDE Community Wiki
< KDb
No edit summary
No edit summary
Line 2: Line 2:


'''KDb is consisted of a general-purpose C++/Qt-only library and a set of plugins.''' Because there is no dependency on [[Kexi]], [[Calligra]] or even on KDE libraries, KDb is developed for a wider audience. Kexi since the version 3 uses it too, thus deprecating KexiDB.
'''KDb is consisted of a general-purpose C++/Qt-only library and a set of plugins.''' Because there is no dependency on [[Kexi]], [[Calligra]] or even on KDE libraries, KDb is developed for a wider audience. Kexi since the version 3 uses it too, thus deprecating KexiDB.
'''Unlike QtSQL, KDb 'knows' how to create database and new tables.''' It has a Qt/C++ API for that. There is no need to pass SQL at all but you can pass if you wish (it will silently parse your statements before contacting the database). KDb is developed as a next generation database handling layer for Kexi and similar complex apps.


'''KDb is widely free/libre software available under the [http://en.wikipedia.org/wiki/LGPL GNU Lesser General Public License (LGPL)].''' Thus, developers are free to:
'''KDb is widely free/libre software available under the [http://en.wikipedia.org/wiki/LGPL GNU Lesser General Public License (LGPL)].''' Thus, developers are free to:
Line 9: Line 7:
*extend it for specialized use cases
*extend it for specialized use cases
*contribute directly to KDb
*contribute directly to KDb
If you really want, QtSQL drivers can be wrapped to be KexiDB compatible.
However, wrapping QtSQL for executing SQL statements means:
=== KDb and Qt SQL ===
KDb has a slightly different architecture and requirements than Qt SQL.
Unlike QtSQL, KDb 'knows' how to create database and new tables and it has a public C++ API for that. You do not need to pass raw SQL statements to KDb at all in order to use this feature. But passing the SQL statepents is possible if this is what you wish. KDb is event able to parse the  statements before contacting the database.
KDb is developed as a a data/database handling layer for KEXI and similarly complex apps.
In turn, Qt SQL has poorer error handling. For example, it is often problematic with Qt SQL to recognize whether the connection failed because the database does not exist or because the password was wrong. Qt SQL error values aren't sufficiently rich to provide such  information. Developer sometimes try to parse the error messages, what makes the application code complex and hard to maintain.


==History==
==History==
KDb is a new iteration of library developed since 2003 within. It was previously known as KexiDB. Together with [[Kexi]] application, development is organized together with the [[Calligra|Calligra Suite]] (formerly KOffice) project but KDb's release schedule is separate and there is no technical dependency on Calligra applications or frameworks.  
KDb is a new iteration of a connectivity library developed since 2003. It was previously known as KexiDB. The development happens within the [[Kexi]] application project. Even if KDb's release schedule is synchronized with KEXI's schedule at the moment, there is no technical dependency on KEXI.  


*Read about history of the project in the [http://commit-digest.org/issues/2010-12-12/ KDE Commit-Digest].
*Read about history of the project in the [http://commit-digest.org/issues/2010-12-12/ KDE Commit-Digest].

Revision as of 00:00, 27 August 2023

KDb is a database connectivity and creation framework for various database vendors.

KDb is consisted of a general-purpose C++/Qt-only library and a set of plugins. Because there is no dependency on Kexi, Calligra or even on KDE libraries, KDb is developed for a wider audience. Kexi since the version 3 uses it too, thus deprecating KexiDB.

KDb is widely free/libre software available under the GNU Lesser General Public License (LGPL). Thus, developers are free to:

  • use KDb in applications, also commercial
  • extend it for specialized use cases
  • contribute directly to KDb
If you really want, QtSQL drivers can be wrapped to be KexiDB compatible.

However, wrapping QtSQL for executing SQL statements means:

KDb and Qt SQL

KDb has a slightly different architecture and requirements than Qt SQL.

Unlike QtSQL, KDb 'knows' how to create database and new tables and it has a public C++ API for that. You do not need to pass raw SQL statements to KDb at all in order to use this feature. But passing the SQL statepents is possible if this is what you wish. KDb is event able to parse the statements before contacting the database.

KDb is developed as a a data/database handling layer for KEXI and similarly complex apps.

In turn, Qt SQL has poorer error handling. For example, it is often problematic with Qt SQL to recognize whether the connection failed because the database does not exist or because the password was wrong. Qt SQL error values aren't sufficiently rich to provide such information. Developer sometimes try to parse the error messages, what makes the application code complex and hard to maintain.

History

KDb is a new iteration of a connectivity library developed since 2003. It was previously known as KexiDB. The development happens within the Kexi application project. Even if KDb's release schedule is synchronized with KEXI's schedule at the moment, there is no technical dependency on KEXI.