jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Nuescheler" <david.nuesche...@gmail.com>
Subject DM Rule #1: Data First, Structure Later. Maybe.
Date Sat, 07 Jul 2007 11:01:45 GMT
Explanation
---

I recommend not to worry about a declared data structure in an ERD
sense. Initially.

Learn to love nt:unstructured (& friends) during development (and later).

I think Stefano pretty much sums this one up. [1]

My bottom-line: Structure is expensive and in many cases it is
entirely unnecessary to explicitly declare structure to the underlying
storage.

There is an implicit contract about structure that your application
inherently uses. Let's say I store the modification date of a blog
post in a "lastModified" property. My App will automatically know to
read the modification date from that same property again, there is
really no need to declare that explicitly.

Further data constraints like mandatory or type and value constraints
should only be applied where required for data integrity reasons.

[1] http://www.betaversion.org/~stefano/linotype/news/93/

Example
---
The above example of using a "lastModified" Date property on for
example "blog post" node, really does not mean that there is a need
for a special nodetype.

I would definitely use "nt:unstructured" for my blog post nodes at
least initially.

Since in my blogging application all I am going to do is to display
the lastModified date anyway (possibly "order by" it) I barely care if
it is a Date at all.

Since I implicitly trust my blog-writing application to put a "date"
there anyway, there really is no need to declare the presence of a
"lastModified" date in the form a of nodetype.

Mime
View raw message