Re: [gnome-db] meta store.





2009/7/17 Bas Driessen <bas driessen xobas com>
Hello,

Question regarding meta store. There is a function to update the meta store as follows:

gda_connection_update_meta_store

When I run this, it waits about 10 seconds or so, so I assume it is building the meta store. However, when it is finished, I don't see any output. I would expect files to show up in etc/libgda-4.0, but nothing is added there. Is there meant to be any output?

Also if this generates a structure in memory only, does that mean that I have to call this function every time when I start my application?

My understanding was, that the meta store was written to an XML file and that the libgda would reference that. Only when a table layout has changed, you would run the gda_connection_update_meta_store function to update the XML files.

Meta data storage has changed since V3. In V3, getting the meta data was quicker and created an XML file which was loaded in memory even if unused. There were problems with that approach:
* it used memory even when not required
* not much meta data was being fetched (which is why it was so fast), the main missing feature was that database schemas were not handled.
* the loading time would have increased and the consummed memory as well if I had added the missing meta data
* it was almost impossible to the API used to add some personnal data to the dictionary.

So in V4:
* the meta data is now stored in a database instead of an XML file
* the data is not loaded in main memory if not needed
* the meta data being fetched now includes schemas, triggers, ...
* the database used to store meta data from a connection can be configured, see http://library.gnome.org/devel/libgda/stable/gda-dict.html#GdaMetaStoreSetup. By default a temporary database is created, destroyed when the connection is closed (more exactly when the GdaMetaStore object associated to the connection is destroyed).

it's up to the user to handle the meta data updates, probably one time to get the complete meta data the first time, and then incremental updates when database objects are created or removed. This is what Libgda's tools (the gda-sql console program and the upcomming gda-browser UI program) do: then create an SQLite database to store meta data in $HOME/.local/share/libgda

Vivien



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]