This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new Linux.com!

Linux.com

Feature

Building databases with Kexi and OpenOffice.org 2 Base

By on September 14, 2005 (8:00:00 AM)

Share    Print    Comments   

If you asked most Linux users which Windows applications they want to be able to use, Microsoft Access would probably come in at the bottom of the list. However, there are also many people who consider it to be a useful and important rapid application development (RAD) tool. Now Linux users have a couple of good Access alternatives -- KDE's Kexi and OpenOffice.org Base Version 2.

Kexi is touted as an open source competitor for Access. It comes as part of KOffice, but can also be downloaded as a standalone application. Installing Kexi is fairly simple, even if you've never installed a Linux application before. On the other hand, OpenOffice.org Version 2 is still in beta, and takes quite a bit more work to install (depending on your Linux distribution). Once OpenOffice.org 2 has been released, it should be as easy to install as the stable version of OpenOffice.org, version 1.1.4.

Database basics - tables

When you open up a new blank database in either Kexi or OpenOffice.org Base you can do pretty much the same things you can with Access. The most fundamental operation is the creation of a new table. Each application gives you a design screen in which to add fields to a table. There are minor differences in the way the information is presented in each application. For example, Base allows you to create a field of datatype Memo (LongVarchar), whereas in Kexi you have to define the same field as Text with a sub-type of Long Text. The end result is, however, exactly the same.

Base does provide a couple of extras. You will find a table creation wizard which may be of some use if you are a novice, as well as a view creation form that can be useful if you are using PostgreSQL or MySQL 5.

Moving on - queries

Just as with Access you can create queries in Kexi and Base. The key difference is that they both use standard SQL, rather than Access's pseudo-SQL.

Query design is easy in either application. Both give you a form to design a query that's similar to the one used with Access. However, there is a major difference between Base and Kexi when it comes to SQL. Base allows you to create and edit query definitions in either text mode (in which you can enter the raw SQL) or via a design GUI. In this respect it is identical to Access. With Kexi you can create and edit queries only using the design form. There is a SQL screen, but it's used purely for viewing or testing the SQL statements.

Using forms to view the data

Designing a new form is particularly simple with Kexi. That's not to say that it's difficult with Base -- it's not -- it's simply that Base gives you a daunting number of toolboxes and objects at first glance. Even so, you'll quickly have a form up and running within a short time.

You can even use OpenOffice.org's Basic code to create a form that does whatever you need it to. Kexi lacks this option. You can create a script, but there is no documentation on the scripting language used with Kexi. In fact the Kexi FAQ states that scripting is not supported yet. Instead Kexi contains some built-in actions that can be assigned to buttons on the form.

Making the data pretty - reports

Base's Report Wizard is very effective. If you've designed reports using Access, you're going to feel at home here. By contrast, Kexi, as included with KOffice 1.4.1 does not include reports, though reports are in development for Kexi 1.0. Instead you are expected to use KOffice's Kugar application. There is nothing wrong with that, except that if Kexi is actually the Access competitor KOffice claims it to be then it should be able to do the same jobs.

Data in other databases

Both Base and Kexi surpass Access when it comes to using other databases, such as MySQL. They don't do this the way Access does, by creating links to individual tables. Instead they connect directly to the database in question. Kexi can even create a new database from scratch, though not through its GUI. The following example would create a MySQL database called "kexi_demo" on the local host.

kexi --createdb --drv mysql --host localhost --user root kexi_demo

A key difference between Kexi and Base is that Kexi can work with only the external databases that it has created. Base can't create new external databases, but it can work with external databases that have already been created, so long as it has support for that database engine.

There is also a difference in the way that the two applications connect to a new database. Kexi has no GUI for doing this, so you must connect from the command line:

kexi --drv mysql --host localhost --user root kexi_demo
Setting up the MySQL drivers in unixODBC
UnixODBC is easy to use, provided that you know which files to use when adding a new driver. There can be a certain amount of trial and error here. To save a lot of time you can try these settings for MySQL:
Driver = /usr/lib/libmyodbc3.so
Setup = /usr/local/lib/libodbcmyS.so


You may also find that you are missing the file libiodbc.so.2. You can find it at the iODBC Downloads site.

OpenOffice.org needs one of the standard Open DataBase Connectivity (ODBC) applications -- e.g. ODBC on Windows, unixODBC or JDBC (part of Java) on Linux. You may also need the appropriate driver, such as the MySQL connector (also known as MyODBC).

Once you've connected to the database you can go on to create tables and queries with either Kexi and Base.

Migrating from Access?

If you've already done a lot of your development in Access and don't want to start again from scratch, don't despair -- both applications can use the databases that you've created. Base can access them via ODBC, although you will also need Microsoft Data Access Components installed. If you're using Kexi then you can use its Import Database function. This also requires some extra software -- Kexi's MDBDriver.

Performance

You may be tempted to think that Base in OpenOffice.org 2 is the obvious choice as an Access replacement. However, there is a trade-off to its functionality, and that's its speed. It is very slow. I don't know if this is because it's still in beta mode or if it's because it didn't like the Slackware 10.0 system that I use. What I do know is that Kexi is lightning fast in comparison.

I don't think that Kexi's claim to be the "long awaited open source competitor for Microsoft Access" is really true. What is true is that it has the potential to be the open source competitor to Access. And right alongside it will be Base.

Share    Print    Comments   

Comments

on Building databases with Kexi and OpenOffice.org 2 Base

Note: Comments are owned by the poster. We are not responsible for their content.

kexi look promising indeed

Posted by: Anonymous Coward on September 15, 2005 04:21 AM
but still has no documentation<nobr> <wbr></nobr>:-((

#

Database RAD

Posted by: Anonymous Coward on September 15, 2005 09:28 AM
Why don't you try Rekall, it's more mature than Kexi and it's even cross platform. For those occasionally having to work with OS from the dark side like Win or OS X.

#

PostgreSQL

Posted by: Anonymous Coward on September 15, 2005 02:38 PM
OpenOffice.org Base looks good, but I can't understand why it doesn't come with support for PostgreSQL (on FC4) out of the box!

#

what about knoda

Posted by: Anonymous Coward on September 15, 2005 04:47 AM
Knoda has been around for longer and looks more polished.
<a href="http://www.knoda.org/" title="knoda.org">http://www.knoda.org/</a knoda.org>

#

BASE? ...and that's its speed. It is very slow.

Posted by: Anonymous Coward on September 16, 2005 12:42 AM
Slow?

Is this because of the use of JAVA with BASE, vs a potentially faster "something else"?

Any suggestions?

#

Re:BASE? ...and that's its speed. It is very slow.

Posted by: Anonymous Coward on September 16, 2005 10:57 PM
Is this because of the use of JAVA with BASE, vs a potentially faster "something else"?




Yes but not only: it's also because



1. Any OO.org application's GUI is not native, so it takes longer to start up the application and draw something on the screen



2. Looks like OO.org Base is in fact bouild on top of Writer's. It's curious hack but you are obviously not going to love it: try to click some more times on the form's surface and you will get Writer's cursor ready to entering text. Looks a bit like a mockup, not a real app made from scrach.... I've been also able to see "Writer" name on one of Base's title bars..


#

Data Access

Posted by: Anonymous Coward on September 16, 2005 03:20 PM
Nice overview of the two applications covered. One error in the article, JDBC is not in any way related to ODBC. There is a driver that will allow JDBC to communicate through ODBC, but that's just a driver. It's strongly recommended that anyone using Base prefer to use the native Java driver (also called Type 4) for whatever external database they wish to connect to, as this will be both faster and more reliable than the double-stack through ODBC.

#

Some explanation

Posted by: Anonymous Coward on September 16, 2005 04:17 PM
[In Kexi] there is a SQL screen, but it's used purely for viewing or testing the SQL statements.


You can write SQL statements in SQL View in Kexi's Query Editor ans then switch back to either Visual Design Mode (too see it's layout) and Data View mode (to execute it).


Kexi has no GUI for [connecting to a new database]


It is ready to use in Kexi development version from august 2005. To be released for 1.0.



Best regards,

Jarosław Staniek

Kexi Team

#

Rekall

Posted by: Anonymous Coward on September 16, 2005 11:11 PM
Also check out Rekall, <a href="http://www.rekallrevealed.org/" title="rekallrevealed.org">http://www.rekallrevealed.org/</a rekallrevealed.org> and <a href="http://www.totalrekall.co.uk./" title="totalrekall.co.uk">http://www.totalrekall.co.uk./</a totalrekall.co.uk> The 2.3.x development series (should be 2.4.0 shortly) supports both Python and Javascript (KJS) scripting; runs under KDE, Linux QT3-only, Windows and OS/X; forms, reports, queries, copier (generalised data import/export), user-designable reusable components; python debugger; extensive manual; etc., etc<nobr> <wbr></nobr>.....

Try the rest, then use the best!

#

Re:Rekall

Posted by: Administrator on September 17, 2005 06:20 PM
Work is in progress to move over to Qt4. Also the developers are working on adding module to implement the full System Development Life Cycle (SDLC) design methodology to include:


A Network Diagramming Tool

A Simple Project Manager

An Entity-Relationship Modelling Tool

A Bug Tracker


In addition work is in progress to add support for on-the-fly encryption/decryption of Rekall Designs

#

Agreed! Rekall is the Access Killer

Posted by: Anonymous Coward on September 17, 2005 01:16 AM
I've been using Rekall for over 2 years and haven't looked back at Access.

Rekall does everything Access does, and more. Create tables, do queries, create forms, create reports, connect to other databases, etc. Plus, you can use it in windows, mac, and my personal favorite, linux.

#

not quite

Posted by: Anonymous Coward on September 17, 2005 04:21 AM
Rekall's GUI and overall design looks not so polished as its competitors. Unfourtanely the same for Knoda.

#

Rekall - A few facts

Posted by: Anonymous Coward on September 17, 2005 06:09 PM
Rekall supports more databases than all of the others put together, including:


PostgreSQL

SQLite

MySQL (yuck)

DB2

Oracle

Informix

Interbase/Firebird

xBase

Sybase/MS SQL Server.



Recently, the developers added a feature called RekallWeb. RekallWeb is a collection of Python and Javascript interfaces which allow Rekall Desktop applications to run on the Web without any kind of modification whatsoever. For a full feature list and copies of the free version - Rekall V2.1.1 please visit <a href="http://www.totalrekall.co.uk/" title="totalrekall.co.uk">http://www.totalrekall.co.uk/</a totalrekall.co.uk> or for the GPL version (source code only) <a href="http://www.rekallrevealed.org/" title="rekallrevealed.org">http://www.rekallrevealed.org/</a rekallrevealed.org>.


BTW Rekall Revealed is powered by RekallWeb

#

Re:Rekall - A few facts

Posted by: Anonymous Coward on September 19, 2005 03:35 AM
Unfortunately Recall has some problems. As far I have tested it I found it could not show proper way the Cyrillic alphabet and some locales.

#

Building databases with Kexi and OpenOffice.org 2 Base

Posted by: Anonymous [ip: 212.33.255.235] on February 17, 2008 01:51 PM

This story has been archived. Comments can no longer be posted.



 
Tableless layout Validate XHTML 1.0 Strict Validate CSS Powered by Xaraya