Kexi, part of the KOffice suite, allows anyone to create, populate, and maintain a database.

The open source world offers a number of solutions for managing data. SQLite is a tiny yet powerful database; MySQL is extremely popular with web developers; and PostgreSQL boasts transactional features on par with Oracle. All three solutions have command line and programmatic interfaces, and both MySQL and PostgreSQL have support for browser-based management. SQLite, MySQL, and PostgreSQL all have strengths and weaknesses, and each is capable, but sadly, none of the three is suitable for the new Linux netbook owner or casual desktop user. Indeed, Linux users have had few options for a friendly, graphical, and lightweight database solution akin to Microsoft Access.

A Windows user can build tables, enter data, formulate queries, and craft reports in Access with little more than a mouse. The Base tool attempts a similar mission within Linux environments, but some popular distros don't include Base with the default desktop, and many Linux users are still searching for other options.

The Kexi database development tool is another alternative for many Linux users. Kexi, billed as “Access for Linux,” has been available since 2006, and the latest stable release, Kexi 1.1.3, is part of the KOffice 1.6 suite. Kexi 1.1.3, which I used for this article, dates to April 2008, but Kexi 2.0 is marching through a series of pre-releases, with the intention to ship by the end of the year.

Introducing Kexi
Kexi, like Microsoft Access, offers a friendly user interface to create, populate, and maintain a database. Many tasks in Kexi are like filling out a spreadsheet. For example, to create a table, you fill out a row for each field in the table. Then you name each field, assign a type (such as date, integer, or text), and perhaps link the new field to an existing field in another table, thereby relating the two tables (hence the name “relational database”). Once you define a table, you can populate it with data as you would a spreadsheet.

Crafting queries in Kexi is a little more involved but does not require any knowledge of SQL. Instead, a query is largely drag and drop: Choose one or more tables, relate one field to another by point and click, and select the fields you want to display. Kexi also offers drag-and-drop form building to create interfaces to enter data, and like Access, Kexi either can use its own database format or can connect to another engine for more oomph. In Kexi’s case, you can use MySQL. If you dislike the phpMyAdmin interface, try Kexi to browse an existing MySQL database.

Kexi is modal. The Design View creates and edits tables, queries, and forms, whereas the Data View shows the end result. Building an application in Kexi is typified by switching from one mode to the other. First I’ll use Kexi to build an application, exploring its features along the way.

Installing Kexi
The easiest and fastest way to install Kexi is via your package manager. On Debian and Ubuntu variants, use apt-get or one of the equivalent graphical front ends:

$ sudo apt-get update
$ sudo apt-get install kexi

Kexi depends on KDE [5]. If you do not use KDE or any of its components, the addition of Kexi, KDE, and the latter package’s attendant dependencies could add some 100 packages to your system, including the KOffice suite. Otherwise, the process is very quick. After the installation finishes, run Kexi:

$ kexi

When the Choose Project window pops up, choose Blank Database and click OK. The next prompt asks where you would like to create the database. The two choices are in a file or in a MySQL database server. To keep things simple, choose New Project Stored in File. When Kexi asks for a database name, enter Example One, click OK, and use the browse dialog to choose a location for the file on your disk.

The pane on the left collects your tables, queries, forms, and scripts (the latter is an experimental feature and is ignored here). Kexi calls each of those entities an object. To create a new table, for example, rightclick on Tables and choose Create Object: Table. (From the menubar: Choose Insert| Table.) The tool palette is immediately below the menubar; the list of available tools changes depending on the task at hand. The central area of the Kexi window is the heart of the application, in that most of your work is performed here. The rightmost panel, which is empty in but shown in subsequent figures, is used to edit the attributes of fields.

Source of Information : Linux Pro Magazine August 2009

No comments:

The many complications and risks of tape

Magnetic tape technology was adopted for backup many years ago because it met most of the physical storage requirements, primarily by being ...