Proposal: Encouraging DB-using applications

Don Sanders sanders at kde.org
Mon Sep 22 07:15:33 BST 2003


On Sunday 21 September 2003 21:39, Alexander Kellett wrote:
> On Sun, Sep 21, 2003 at 11:08:31AM +0200, Guillaume Laurent wrote:
> > > Yes, all of these can be implememnted by grepping a few text
> > > files. But
> > >
> > > a) That doesn't scale
> >
> > It scales more than enough for the amount of data a typical user
> > will ever have to handle.
>
> agreed.
>
> > > b) That's ugly ;-)
> >
> > Who cares, we need something which works, is easy to maintain and
> > reliable.
>
> fully agreed. imo sql is just crap crap crap
> (for this app domain, though personally i
>  just hate it for everything,  non relational 
>  xml dbs are just way cuter...)
>
> > > c) That's actually harder!
> >
> > Come on. It can become harder if you actually have fairly complex
> > queries to do. In most cases, it won't.
>
> its the serialization thats the bitch, complex
> queries just aren't very frequent, and if they
> are you usually just did some terrible app/db
> design.

I dislike serialization and would like to eliminate the need for it 
entirely, but I'll assume that isn't realistic for this discussion.

> serialization isn't tackled well at all in kde at
> the moment. maybe people should think of this problem
> (versioning, large data sets that shouldn't need to
> be fully deserialized etc) rather than adding this
> sql crap to kde apps.

I've thought about this kind of stuff a fair bit. I think this is an 
important issue, I don't think it's a KDE specific issue.

> basically we need lazy-loading persistance
> for hashs, and more complex data structures

I think the basic 'data structure' that gives you this is a Btree:

"Tree structures support various basic dynamic set operations 
including Search, Predecessor, Successor, Minimum, Maximum, Insert, 
and Delete in time proportional to the height of the tree."

"B-trees are balanced trees that are optimized for situations when 
part or all of the tree must be maintained in secondary storage such 
as a magnetic disk."

http://www.bluerwhite.org/btree/

So a Btree is basically a disk based hash. I'm on the lookout for a 
free C++ Btree implementation, it would be nice if KDE had/depended 
on one.

As good databases are built on Btrees I also consider them 
interesting.

Don.




More information about the kde-core-devel mailing list