Configuring

Depending on the use you're going to get out of libgda, you may have to deep into its internals, but don't be afraid, thigs have been implemented to be easy to use.

Configuration for development

If you want to develop applications using libgda, you should install the libgda-dev[el] package if you do a RPM or Debian-based installation. If you compiled the source code, development files are installed in your system.

The only step you need to do to make sure everything is well installed, is to check that libgda libraries and binaries are seen by your system. That is, make sure that the libgda bin/ directory is in your PATH environment variable, as well as the lib/ in your LD_LIBRARY_PATH (or /etc/ld.so.conf file).

Configuration for accessing a database

If you want to access a data source through a GDA provider, you must first of all have access to this provider, and most importantly, this provider should have access to its specific data source. So, first have your database up and running. For this, you'll have to check your specific data source documentation, or see the libgda providers' specific documentation.

Once you've got your GDA provider installed, whether on your machine or on another one on the network, you must configure your local system to have access to it. If you're on a local installation, once you have installed the GDA provider (by compiling it or by installing its RPM or Debian package), the provider is visible in your machine. This is because the provider package provides a .oafinfo file in which it specifies the location and other information about itself.

If, on the orher hand, your provider is on another machine, you'll have to create the .oafinfo yourself. For this, you'll need to check the OAF installation docs.

Then, the next step is to configure the data sources you want available on your system. For doing this, you should, as for now, use GNOME-DB, which is a frontend to libgda for the GNOME project. [1]

Command-line tools will be provided in libgda for doing so in a not-too-distant future, so you may want to know what information you need to setup a data source.

One of the problem GDA solves is the naming of data sources. Every database system has it's own way of defining names for it's databases. For example MySQL uses the hostname, port number, and the name of the database. Other databases, like Solid use the hostname and port number only. There is no support for multiple databases per server. Because the client does not need all these details, the libgda configuration defines all the properties of such a data source, so that the correct data base server can be contacted. This information is accessed by the client library and sent to the provider, which in turn will parse the string to decide which database must be connected to. The data stored for each data source is as follows:
	      [sales]
		  Provider=OAFIID:GNOME_GDA_Provider_MySQL_ConnectionFactory
		  DSN=DATABASE=test;HOST=localhost;PORT=1111
		  Description=MySQL Test Database in native mode
		  Configurator=None
	     

(8)
The provider for this database is the gda-mysql provider. The value of this entry is used as the object ID for the OAF activation.
This is the most important entry. The value of this entry is the string sent to the provider so that it knows which datasouce to access. How this entry is interpreted by the providers is described in the provider section. The value of this entry is a short description of the datasource. It is here for convenience only and it is not used for any purpose.

Provider's specific information

This section provides information specific to each of the available libgda providers.

Notas

[1]

It would be a good idea to add a command-line tool for managing the configuration, as now, using GConf, is not a matter of hacking on a config text file, as it was before with gnome_config. The API for doing so is already available in the libgda-common library, so it would be really easy. Volunteers?