[
Lists Home |
Date Index |
Thread Index
]
roger
you are starting to get to the heart of something that has been in rdbms
from the start circa 1966 (ref ted codd etc). each column in a table is
an attribute, and each attribute has a domain - integer, float, text,
date, etc. the old fashioned basic types of computing.
everything else is built up in programs, dictionaries, etc
xml however, is typeless. it seems to me to be somewhat meaningless to
ask a typeless language to enforce "x > 16" or even "x is an integer".
neither of these terms has any meaning. in particular "x" and "16" can
be represented in many ways.
so to make some sort of data checking valid xquery and the like can
impose some sort of "typing" onto the data. in practice most of the time
it will work.
but i think that most of the time it's the wrong place and wrong tool
for any of these things. and in spite of the good efforts of many i am
also coming to the conclusion that for document work xml pretty much has
it right. for data interchange it's also excellent. for data management
i don't think it will ever be the right tool without destroying the
things that make it so good for the other two uses.
personal opinion....
rick
Roger L. Costello wrote:
>Hi Folks,
>
>Here are some thoughts:
>
>1. Constraints on data are not equal to business rules.
>
>2. Business rules change. Constraints on data do not.
>
>3. Constraints on data should be specified in XML Schemas. Business rules
>should not. Business rules should be specified in higher level application
>code.
>
>Example:
>
>A company has employees. The current company policy on the minimum age
>requirement is 16. Should the company create an XML Schema that constrains
><minimum-age> to 16? Or, should the company create an XML Schema that
>simply constrains <minimum-age> to an integer, and let applications higher
>up provide further constraints?
>
>Answers:
>
>- Mandating that the minimum age of an employee be 16 is a business rule.
>It is highly likely to change over time.
>
>- The value of the <minimum-age> must be an integer. This is a constraint
>on the data. It will not change over time.
>
>Therefore, an XML Schema should simply constrain <minimum-age> to be an
>integer. Higher level applications should implement the business rule that
><minimum-age> be further constrained to 16.
>
>Comments?
>
>How would you characterize the distinction between "business rules" and
>"constraints on data"? /Roger
>
>
>
>-----------------------------------------------------------------
>The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
>initiative of OASIS <http://www.oasis-open.org>
>
>The list archives are at http://lists.xml.org/archives/xml-dev/
>
>To subscribe or unsubscribe from this list use the subscription
>manager: <http://www.oasis-open.org/mlmanage/index.php>
>
>
>
begin:vcard
fn:Rick Marshall
n:Marshall;Rick
email;internet:rjm@zenucom.com
tel;cell:+61 411 287 530
x-mozilla-html:TRUE
version:2.1
end:vcard
|