Hello Jim,

i think most of this denormalization and key duplication comes from the fact that we (ludovic and myself) had *very bad* experiences with integrity constraints in some systems where updating (removing rows, etc ...) the database in a timely manner was critical. Respecting the correct removal/update order in order to have the constraint cascading appropriately is a real challenge in itself, and we tend to think it is better to rely on the application to maitain data integrity. I personally know this is a major sin regarding proper application design, and much worth as OOD comes into the game.

I've been using O/R mappings frameworks (one we designed from scratch when there was no such thing around in the market) for years, and tend to think they don't mix well when the schema has integrity constraints. I'm not familiar enough with hibernate to give a definitive judgement, and will happily be proven wrong :)

Now if you want to work on the current database schema so it follows all normalization levels, you'd be most welcome, and i'd happily give a hand !!!

Erwan

On 11/4/05, Jim Stuttard <jastuttard@yahoo.co.uk> wrote:
Hi,

As tempus fugit towards release 1.0 I have a bit of a basic architecture
problem with the current DB schema.

Why does XWiki's DB schema depend on a number of proxy primary keys - eg.
ID: bigint? XWikiListClasses has a primary key of id, and name;
XWikiClasses has only a numeric id and name doesn't seem to matter. Is
this just me missing some basic idea?

Doesn't this hide the cardinalities, semantic connections and
non-transitive dependencies captured by primary keys in a fully-normalised
relational schema?

Currently this information would have to be inferred from the existing
schema, taking some time to do. And so I can't tell whether the schema is
normalised or not.

An example might be a Document. If memory serves me, Documents are
frequently uniquely identified by the minimal primary key of {title,
author, publication date}. If you ask "What are the chances of 2 different
documents having the same author name, title and publication timestamp?"
then this satisfices most conditions. An XWikiDoc however has a large set
of required fields and a single key.

Neither MySql nor any other RDBMS I know of uses single-field primary
keys. They are only required in the binary relational model.

I have always thought that good OODB design demanded *explicit*
de-normalisation if needed?

Cheers

Jim

--
Jim Stuttard




--
You receive this message as a subscriber of the xwiki-dev@objectweb.org mailing list.
To unsubscribe: mailto:xwiki-dev-unsubscribe@objectweb.org
For general help: mailto: sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws