2008/7/31 Mathias Hasselmann <mathias.hasselmann@xxxxxx>: > Am Mittwoch, den 30.07.2008, 18:33 -0700 schrieb paragasu: >> i am writing a gtk application to interface with postgresql database. >> the database contain few hundred rows. how programmer usually do this, >> the load the entire database content to app or just load part of it? > > First of all I'd suggest to have a look at libgda[1]. This library > abstracts database access and also provides widgets for database access. > Maybe those guys already invented the wheel you need. Actually there are 2 libraries in Gnome-DB: * Libgda: depending almost only on GLib and LibXML which acts as an abstraction layer between a database and your code (a bit like ODBC or JDBC) * Libgnomedb which uses Libgda and GTK+ and offers some data bound widgets. About memory occupation, you can choose either to load all the results of a SELECT into memory (which has the advantage of speed once loaded but consumes more memory), or use a cursor to access your data (which means faster initial loading and less memory consumption but slower data access over time). The code contains numerous examples and there is a good doc. Regards, Vivien _______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list