<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=Content-Type content=text/html;charset=iso-8859-1>
<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=031193508-16102006><FONT face=Arial
color=#0000ff size=2>Christoph -</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=031193508-16102006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=031193508-16102006><FONT face=Arial
color=#0000ff size=2>I see what you're getting at, and I understand that you
want to do things the 'right' way. However...</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=031193508-16102006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=031193508-16102006><FONT face=Arial
color=#0000ff size=2>1. I believe that modifying the OpenCms database
structure is the wrong way to go. Your modifications would have to be very
deep to allow database referential integrity to work, and therefore (i) it would
take you a good deal of time to understand the OpenCms structure and how it's
used, (ii) it would take you a long time to modify that structure safely, (iii)
it would make your solution extremely brittle, in the sense that fixes or
upgrades to OpenCms couldn't be reapplied without at least a good deal of
testing on your part, and more likely a good deal of
reimplementation.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=031193508-16102006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=031193508-16102006><FONT face=Arial
color=#0000ff size=2>2. Storing anything in OpenCms document properties
doesn't give you any kind of RI either, because their contents are just
strings.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=031193508-16102006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=031193508-16102006><FONT face=Arial
color=#0000ff size=2>3. Re the issue of checking/changing 'legacy' data in
the face of metadata changes: that's always going to have to be done, however
the two are linked. You're going to have to implement the
checking/changing at the application layer in any case (unless you rely solely
on error messages coming up from the database layer!), so why not implement RI
there too, and leave the database layer as it is - largely agnostic to document
structure? After all, RI at database layer is often illusory - it's always
possible for an application layer to make attributions of values which are in
some way nonsensical, even if strictly speaking they're valid according to some
relational schema.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=031193508-16102006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=031193508-16102006><FONT face=Arial
color=#0000ff size=2>Jon</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=031193508-16102006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left>
<HR tabIndex=-1>
</DIV>
<DIV dir=ltr align=left><FONT face=Tahoma size=2><B>From:</B>
opencms-dev-bounces@opencms.org [mailto:opencms-dev-bounces@opencms.org] <B>On
Behalf Of </B>Christoph Schönfeld<BR><B>Sent:</B> 16 October 2006
09:21<BR><B>To:</B> The OpenCms mailing list<BR><B>Subject:</B> Re:
[opencms-dev] Data management for multi-domainregional
customerportal<BR></FONT><BR></DIV>
<DIV></DIV><FONT face="Helvetica, Arial, sans-serif">Hi,<BR><BR>thank you for
your detailed reply, Jonathan.<BR><BR>What kind of metadata </FONT><FONT
face="Helvetica, Arial, sans-serif">do</FONT><FONT
face="Helvetica, Arial, sans-serif"> you store in the dedicated XML content
type?<BR><BR>If one does not use the OpenCms document properties the metadata
needs to be stored and maintained separate from the documents which sounds like
a source of error. There is no </FONT><FONT
face="Helvetica, Arial, sans-serif">integrity </FONT><FONT
face="Helvetica, Arial, sans-serif">checking</FONT><FONT
face="Helvetica, Arial, sans-serif"> for the </FONT><FONT
face="Helvetica, Arial, sans-serif">links from metadata files to documents.
Secondly, there are two points of change/approval for every new document that is
created: the document itself and the metadata document. The latter will be a
</FONT><FONT face="Helvetica, Arial, sans-serif">concurrency bottleneck
</FONT><FONT face="Helvetica, Arial, sans-serif">in my multi-user
scenario.<BR><BR>At first, I had planned to store just the metadata definitions
in XML files and refer to them in custom document properties. It would be easy
to build upon and extend OpenCms's integrated search functionality then. I would
create document properties for topic (main menu structure) and subtopic (sub
menu structure) for example. <BR><BR>However, this approach does not provide
automatic referential integrity checking either. For the case of </FONT><FONT
face="Helvetica, Arial, sans-serif">change to </FONT><FONT
face="Helvetica, Arial, sans-serif">metadata definitions the existing documents
would need to be checked/changed. If the metadata document is an OpenCms
document as well I can not prevent that it is being edited directly.<BR><BR>When
I think about all these problems I think it's quite easy to produce a mess that
way and rather tend to put all metadata in the database. It comes with free RI
checking. It makes upgrades a bit harder but not impossible. I will have to
implement the OFFLINE/ONLINE mechanism myself. Perhaps I can reuse or extend the
OpenCms code to synchronize my own OFFLINE/ONLINE
tables.<BR><BR><BR>Christoph<BR></FONT><BR></BODY></HTML>