Warning this article may contain opinions of the author that you and iTWire don't necessarily agree with. Don't let them get away with it - have your say with a comment!

No. 1 Story

Technology reinforces generation gap

If you believe that technology could be bridging the generation gap, think again. According to Deloitte’s first State of the Media report it’s as stark as ever.

read more

Rapid Linux apps using object databases

Opinion and Analysis

When you think of databases usually MySQL or Oracle or even Microsoft SQL Server come to mind. Yet, object oriented databases have the potential to cut down coding nuts and bolts and speed up app development time – particularly for those migrating to Linux from Windows. Here’s one such compelling SourceForge hosted open source system to do just this.

Let’s clarify the terms. A database is at heart a means of storing collections of data. The most common database model is a relational database, which is made of tables that in some way relate to each other. To illustrate, a database of books might have one table that holds details of authors – first name, last name, year of birth, and so on – and another table that stores details on books. Now, it is wasteful on memory to store the author’s name with each book. Thus the authors table will have another column that holds a unique identifier which is known as the primary key. This will be duplicated in other tables in place of that whole row. Here it is known as a foreign key.

Sometimes the choice of primary key is natural; a table of cars could use the registration plate as its primary key because this is unique for any car. A table of books, like that above, might use the ISBN. However, typically for people we might invent a column that merely counts up from 1 to as many people as we need to store. That’s because a person’s first name or last name, or even the combination of both, is not necessarily unique to that person. I certainly know there’s plenty of David M Williams' in the world; in fact we come in six packs.

You might think in this modern hyper-connected world that a mobile phone number could serve to identify any given person but it’s not sufficient either. Even if we assume each mobile phone number belongs to just one person it won’t be the case that every person has a mobile phone number and therefore will have no identifying number at all.

This is the basis of MySQL and probably most any other database system you’ve heard of, because the relational model has long been the dominant way data is stored for many decades. (As an aside, Lotus Domino/Lotus Notes uses a hierarchical database model which was championed by IBM in times past.)

However, for an application developer, it’s a burden. Every program that works with data that is preserved between sessions has to contain routines which store and retrieve this data, in this tabular format. Often, this format is an artificial imposition upon the way data is stored in memory.

If the program contains especially complex data structures then unrolling and flattening them to mould them to a series of linked tables can be quite arduous. I believe this is even a barrier to developers migrating over to Linux from other platforms. After all, a Windows developer, having decided to make the switch, has to get a handle on many things like the way the file system works including access permissions, potentially a new programming language, GUI toolkits, different database systems and other things. By decreasing the complexity of the database a barrier to developers has been removed and in fact deployment is also made easier for the end user.

Here’s how to get up and running with db4o, an open source object oriented database. And it’s dead simple.

CONTINUED