![]() |
![]() |
![]() |
GNOME Data Access 3.0 manual | ![]() |
---|
This section presents the main features of the 3.0 version of Libgda.
Libgda is a low-level database abstraction layer built on top of each database C API. In terms of abstraction, Libgda offers the following top features:
Open a connection to any database which type is supported using either a defined data source (defined per user or system wide) or directly providing connection parameters. Several connections can be opened at the same time.
Run any SQL query against an opened connection; any SQL query can be extended to define query parameters
using an easy to understand notation. If the SQL query was a SELECT statement, then an array of data is
returned (as a GdaDataModel
object), and otherwise the number of rows affected
by the query is returned. For very large data sets, it is possible to specify that the returned array
of data should be based on a cursor to avoid loading it into memory (this feature is not currently
implemented in any provider, though).
Perform most of the data definition queries (including database creation) for the database types which support it
Create and maintain an up to date dictionary of the structure of a database containing the definitions of
the tables, constraints, data types, ... A dictionary is represented by a GdaDict
object
Define and store query objects which are transformed into SQL before being executed and for which it is possible to know if they use only defined database objects. Query objects can be defined by hand coded construction or by parsing SQL.
Easy to extend data models for custom requirements which can integrate within the Libgnomedb library
Support for binary data and for BLOBs in a transparent way, see the Gda value section
Support for detailed parameters in SQL queries, see the SQL queries section
The database types which can be accessed at the time of writing are the following ones:
Access (.MDB files): uses the MDB Tools library to access the .MDB files, and is limited to getting information about tables and running very simple SELECT queries;
Firebird: compiles, needs testing;
IBM DB2: compiles but is not useable, work in progress;
Microsoft SQL Server and Sybase using the FreeTDS library: compiles, needs testing;
mSQL: compiles, needs testing;
MySQL: fully functionnal;
ODBC: seems to work correctly, needs testing;
Oracle: work is progress, useable;
PostgreSQL: fully functionnal;
SQLite: fully functionnal;
Sybase: compiles, needs testing;
Xbase: compiles, needs testing