Features vs. Glom

Kexi and Glom – lean tools compared Monokini, sxc.hu Semi-Flyweights

Kexi and Glom aim to create with little overhead. for the default installation, it will store its data in an SQLite database and store We compare the power of these two tools. By Frank Hofmann the database as a file in the user’s home directory. This means that only the user can access the database. sers usually don’t have direct achieve initial results with very little In contrast to this, Glom stores its access to the functionality of a overhead. data in a PostgreSQL database, which it mature relational database be- Kexi is an spinoff of , the office either deposits in the user’s home direc- U cause managing the database suite by the KDE project, whereas Glom tory or provides centrally on the system. typically requires root privileges. But, if comes from the Gnome camp. Neither of The program only uses a subset of the you need something more than a simple these programs is an unknown quantity, Post­gre­SQL functions and can therefore table, Glom [1] and Kexi [2] are two pro- and both are regarded as pretty stable. only modify tables that it has created it- grams that give you the ability to create Kexi, for example, is available directly as self. Therefore, if several users run a database, form author queries, and a package from the Debian, Ubuntu, Red Glom, there is no danger of any conflict generate reports. Hat/​Fedora, and Mandriva/​Mageia re- Both applications are very similar in positories. terms of their field of use. In addition to Thus far, Glom has been available handling the preparatory work, they from the project’s website as a download create the database schemas and selec- for Ubuntu, Fedora, and Mandriva. Both tion masks. These two programs allow programs can be set up easily with the users without any database skills to respective package managers. If you are looking for a similar free project, the ob- Author vious candidates are Open­/​LibreOffice Base [3][4], H2 [5], and DBDesigner 4 Frank Hofmann studied computer science at the Technical University of [6]. On the commercial market, Glom Chemnitz, Germany. He currently works and Kexi’s competitors are Microsoft Ac- at Büro 2.0, Berlin, an office network of cess, FileMaker Pro for Mac OS X or the open source experts (http://www. iPad [7], and Oracle Forms [8]. buero20.org), where he provides services in the print and pre-press field (http:// Connectors Figure 1: When you launch Kexi, a wizard www.efho.de). Frank is a member of the Kexi offers connectors for MySQL, Post- pops up to help you create a new database Potsdam User Group (upLUG). greSQL, and SQLite databases. If you opt or edit a previously saved project.

44 MAY 2012 Issue 138 linux-magazine.com | Linuxpromagazine.com

044-048_Glom.indd 44 3/20/12 5:08:59 PM Features Kexi vs. Glom

in terms of the PostgreSQL database used. Kexi Kexi adopts the look of other Calligra ap- plications and initially launches a wizard (Figure 1). In the dialog, you can use the tabs to select whether you want to create a new project or continue working on an existing one. When you start the program, you can choose an empty document, access data via a template, or import data from an existing database. To edit an existing project, you can take the project data ei- ther from a database server (MySQL, PostgreSQL, xBase) or from a local file. Figure 3: For each field in the table, Kexi offers a dialog with detailed properties. Figure 2 shows this selection with the database formats supported by Kexi in local files. Editor pane appears on the right-hand the SQL query in the Data tab and shows After this , a window pops up with side, where you can use it to specify the you the results, which are in the typical a three-panel view. The menu and navi- individual fields (Figure 3). database style, with a slightly more at- gation bar are located at the top; this is The Data button takes you to view in tractive look. where you open and close projects, cre- which you can populate the table with Kexi’s feature scope includes functions ate database schemas in the form of ta- data. Depending on the number of fields for creating tables (fields and data), cre- bles and SQL queries, design dialog win- in the table, you will see a number of ed- ating SQL queries, and evaluating the re- dows and reports, and import and export itable input fields organized into rows sults by, say, creating input fields or re- data and database content. (Figure 4). ports. Unfortunately, the developers The project navigator on the left-hand When you are editing an SQL query seem reticent about documenting the lat- side provides a tree view with an over- (SQL button), Kexi shows you an import ter two functions, which makes their use view of all of the tables, SQL queries, di- field with multiple lines, where the key and integration less than intuitive. In alogs, reports, and scripts for the current words are highlighted to help you keep daily use, I noticed a couple of things to project. The central area in the window track of complex queries. If needed, you be aware of when working with Kexi. contains the details of the selected table, can press the Check Query button to see For example, if you retrospectively mod- SQL query, or dialog. The appearance of whether the query is valid. If so, you ify the schema of an existing table, the this part of the user interface depends on will see a check mark in the input field application will rewrite part of the the object on which you are currently and a note to the effect that The query is SQLite database. Unfortunately, the data working. correct. in a modified table will be lost. If you are defining the individual fields To check whether you have connected Kexi initially defines text fields with a in a table (under the Design button), this to the correct tables, you can go back to length of 200 characters; however, you part of the window will show you an ed- the Design button and toggle to visual can modify this length in the Properties itable row of input fields. The Property mode (Figure 5). Kexi lets you launch dialog. Another thing to watch out for is

Figure 2: Kexi supports a number of database formats in local files. Figure 4: A form lets the user populate the selected table.

linux-magazine.com | Linuxpromagazine.com Issue 138 MAY 2012 45

044-048_Glom.indd 45 3/20/12 5:09:05 PM Features Kexi vs. Glom

line with input fields and adds a new table (Figure 8). Delete removes the table that you selected in the list. The Open button takes you to the main Glom win- dow with the selected table, where you can enter the details (fields and field for- mats). The main Glom window offers a menu bar from which you can access most ac- tions directly. The buttons that are avail- able in the bar depend on the current ap- plication mode. In Developer mode, you can modify the database schema, whereas in Operator mode, you can only enter data – the menu items used to modify the schema are grayed out. To switch the mode in which you are Figure 5: If needed, you can click to check the connections between the tables. working, you can select the menu item Developer | Operator mode or Developer | that the program does not save all the that follow (Figure 6). It offers you the Developer mode. Below the menu, the content (tables, data, SQL queries) until choice of opening an existing document application shows you all the informa- you close a project, and you don’t have a or creating a new project. If you choose tion for the currently selected table. button to save data on the fly. the first option, you can choose to access To define the fields and field formats Kexi stores local project data in the the document on the network or load a for a table, first select the desired table in SQLite database format. This opens up local file. Tables | Table name. Then, go to the De- an option for running the SQLite3 com- To create a new project, you either cre- veloper | Fields menu to open a separate mand-line tool to investigate the Kexi ate an empty document or use one of the window where you can specify the field files and make any necessary correc- templates that come with the program. definitions (Figure 9). Pressing Delete re- tions. This feature is useful for trouble- The templates include some fairly com- moves the selected field from the list. shooting, and it allows you to peek at plex examples with tables, connections, the inner workings of the database and reports that might help you learn whenever you need to do so. what information to enter where in Overall, Kexi leaves you with a fairly Glom. After this step, you define the middling impression. From a production name and the file name for the project. point of view, it is suitable for small Additionally, you need to define the title projects and small volumes of data. and database type – either local or on an Some parts of Kexi seem to be highly un- external database server (Figure 7). stable – this is particularly true of the se- The next step is to define the database ries 1.0 versions. Many positive changes schema. To do so, you first must define have been made as of version 2.0. In the the individual tables. Pressing the Add Figure 8: Glom provides an easy approach to lab, I used version 2.3.3 running on Xu- button in the dialog takes you to a new creating tables. buntu 11.10.

Glom When you launch Glom, a wizard pops up to accompany you through the steps

Figure 6: The Glom wizard helps you create a new project. Figure 7: With just a few details, you can create a new project.

46 MAY 2012 Issue 138 linux-magazine.com | Linuxpromagazine.com

044-048_Glom.indd 46 3/20/12 5:09:07 PM Too Swamped to Surf? Our ADMIN Online website offers additional news and technical articles you won’t see in our print magazines. Subscribe today to our free ADMIN Update newsletter and receive: • Helpful updates on our best online features • Timely discounts and special bonuses available only to newsletter readers • Deep knowledge of the new IT Yuri Arcurs,© fotolia.com

www.admin-magazine.com/newsletter

LNM_AdminUpdate_1-1.indd 1 11/29/11 1:05:53 PM Features Kexi vs. Glom

(e.g., to output tables or connect them). The Python interface, which you can ac- cess via Developer | Script library, is very sparsely documented. The same thing applies to relations between tables (De- veloper | Relations for this table) and the Developer | Reports function. Just as in Kexi, the program lacks the buttons for saving data on the fly – the software doesn’t save the content until you close the project. In the lab, I used Glom version 1.20.7 on Xubuntu 11.10. In daily use, you will probably appreciate the mostly orga- nized and understandable manual that the developers integrated into the Glom interface and that appears in a separate window. Right now, Glom is an excellent choice for smaller projects – for example, an ad- Figure 9: Defining field types in Glom involves just a few mouse clicks. dress or a task manager. The ability to connect to tables would make Glom Pressing the Add button lets you sup- log with a selection list of the previously suitable for larger projects, such as a plement the details for a field. The Name defined fields (Figure 10), and pressing combined customer and invoice man- column is for the field’s object name in Select adds the field that is selected in agement system. the database schema. Title gives you the the list. field name as it appears as a column After defining all the tables and popu- Conclusions header in the table overview. The field lating them with values, you can move Kexi and Glom are both promising tools Type defaults to Number. on to more complex actions. Glom gives that facilitate the use of a database for Clicking on the Type field opens a you an Edit | Search menu item which newcomers to the topic. Both programs drop-down menu where you can modify you can use to apply a search (you can have some rough edges, but they are al- the value: You can choose between the also use the keyboard shortcut Ctrl+F). ready usable for smaller projects. Al- Text, Date, Time, or Image field types. The search is launched against the entire though these tools are unable to com- Pressing the Open button takes you to table, but the results will only show you pete with commercial applications such another dialog box that lets you specify a the lines that contain matches. as FileMaker Pro or Oracle Forms at this field in more detail – for example, by de- Pressing Search all, which is located time, there is no reason for that to re- fining a default value or the numeric for- next to the number of matches, lets you main true. nnn mat. remove the filter. Clicking on a column After defining all of the fields, you can header will sort the table on the selected Acknowledgment go to the Developer | Layout menu item column; clicking the header again tog- I would like to say thank you to Wolfram to specify the order and view of the gles from ascending to descending sort Eifler for his critical appraisal and fields in the table. You can use the but- order. comments on this article. tons to change the order or position in Glom does not give you an option for the view. Pressing the Delete button re- running SQL commands against tables moves a field. Info To change the [1] Kexi: http://kexi‑project.​­ org​­ way in which a field [2] Glom: http://www.​­ glom.​­ org​­ is displayed (e.g., text color, font), you [3] OpenOffice.org Base: http://www.​­ ​ need to press the ­openoffice.org/​­ product/​­ base.​­ html​­ Formatting button. [4] LibreOffice Base: http://​­www.​ The Edit button ­.org/​­ features/​­ base/​­ takes you to the [5] H2: http://www.​­ h2database.​­ com​­ window described [6] DBDesigner 4: earlier, where you http://www.​­ fabforce.​­ net/​­ dbdesigner4/​­ can edit the details [7] FileMaker: http://www.​­ .​­ com/​­ of the field. [8] Oracle forms: The Add Field Figure 10: You can arrange the previously defined fields in the table http://​­www.​­oracle.​­com/​­technetwork/​ button opens a dia- to suit your needs. ­developer‑tools/forms/​­ overview/​­

48 MAY 2012 Issue 138 linux-magazine.com | Linuxpromagazine.com

044-048_Glom.indd 48 3/20/12 5:09:08 PM