You are here: Home » Reply

Reply To: Database structure

#8990

rpedde
Participant

@steelbutt wrote:

first of all I’d like to thank you for this great server. I’ve taken a look at the database structure and was wondering whether there’s a specific reason why you decided against normalizing the schema, i.e., remove a great deal of redundancy from the database. Also I’d like to know if the database structure is somehow abstracted from, i.e., whether it would be possible to change the underlying db structure without having to change major parts of the server.

A couple reasons:

1. The code has to be able to run on very low-end hardware. It runs right now pretty decently on 200 MIPS machines with 16 Mb of physical ram. As soon as you start joining several tables together, the memory requirements start to tank low-end machines.

2. I want non-sql backends like gdbm, so I wanted a db schema that was conceptually similar across all platforms — making testing much easier.

As far as changing the backend, it’s doable — the only thing it really needs to do is present char** rows, and start and reset enumeration of rowsets. That’s really it.

I’m going to move the db providers to plug-in module, which should make the db backend easier to write (and change), as the interface will be both more stable and more obvious.

— Ron