It’s now possible to create a new database while declaring a new data source from the Gnome-DB control center (at the moment only with SQLite and PostgreSQL backends, more to come).
To create a new database, start normally to declare a new data source as shown in the following screenshot:
then check the “create a new database” option as shown
and fill in the required parameters to create the database as shown in the following picture for SQLite
and in this one for PostgreSQL
Libgnomedb comes with a utility to configure data sources for any application using libgda: gnome-database-properties. I’ve added support to specify if a data source must be specific to the user, or available to all users (system wide).
I’ve been busy lately reworking how libgda manages its data sources and how libgnomedb interracts with them (libgda and libgnomedb are part of the Gnome-Db project).
Libgda stores data sources (a data source tells how to access some data in a database: types of DBMS, database name, connection parameters, etc) in two XML files: a system wide file ($prefix/etc/libgda/config) and a per-user file (~/.libgda/config).
For a long time Libgnomedb did create a copy of all the data sources in GConf to get modifications notifications, but there were corner cases where problems would appear.
Now Libgda uses either Gamin or
FAM when available to monitor config file changes and notify applications directly. The benefits are:
- less potential bugs
- data sources management easier to understand
- less code to maintain in Libgnomedb
- don’t use GConf when not necessary