Re: Relational vs network vs hierarchic databases

From: Laconic2 <laconic2_at_comcast.net>
Date: Sun, 7 Nov 2004 17:20:21 -0500
Message-ID: <4pudnZvZrem4PBPcRVn-tg_at_comcast.com>


"Fredrik Bertilsson" <fredrik_bertilsson_at_passagen.se> wrote in message news:31f7e57d.0411070332.2cfb9596_at_posting.google.com...
> Sometimes when debating with OO people they claim that network and
> hierarchic databases are better than relational databases. I can't see
> any problem space that would be easier to model with the network or
> hierarchic model. The only thing that could be better with network and
> hierarchic databases is performace in some special situations, but
> otherwise I can't see any advantages with these paradigs, or? What are
> the advantages with network and hierarchic databases vs relational?

A lot of OO people think about persistent shared data much the same way that a lot of traditional programmers do. They tend to think of operating on one record at a time. Anyone stuck in that mode of thought is apt to find a relational database cumbersome and awkward, without adding any particular benefit.

It isn't until one begins to think in terms of sets of tuples that the power and simplicity of relational operators like restrict, project, and join start to really pay off. The difference between thinking in records and tuples is not conceptually difficult. The difference between operating on one at a time, in loops, and operating on entire sets IS conceptually difficult, at first.

Add to that the fact that many, many programmers get their first exposure to working with a relational database by working on a database whose design truly sucks. The negative impression they form while they are still naive will last for years.

Even worse, many projects these days are being built around a database just because "everybody else is doing it". Some projects would be better off with a file than with a database.

Hierarchical and network databases DO have a performance edge over relational databases, all other things being equal. However, all other things are rarely equal. If you need the power, simplicity, and flexibility that you get with a relational database, and you know how to design the database and the code for speed, then the difference in speed is likely to be trivial.

It takes time to learn how to use a relational database well. It also takes time to learn how to design one well.

The above applies more or less equally to databases accessed by SQL and to databases accessed by a "true relational interface". But if you use SQL, you do have to be careful about the difference between a relation and a table. Received on Sun Nov 07 2004 - 23:20:21 CET

Original text of this message