[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Re: 3 possible approaches for representing concepts


models for representing concepts
At 05:19 PM 4/2/2003 -0500, Chiusano Joseph wrote:

>APPROACH #1: Element-based approach
>
>- One long-named element that represents the entire "concept":
>
><CurrentYearBudgetFinalEstimatedAmount>999.99</CurrentYearBudgetFinalEstimatedAmount>
>
>APPROACH #2: Attribute-based approach
>
>- One short- and simply-named element that represents the most basic
>concept, with multiple attributes to "fill in the meaning":
>
><Amount yearType="CurrentYear" amountType="Budget"
>finalIndicator="Final" estimateIndicator="Estimated">999.99</Amount>
>
>APPROACH #3: Combined approach
>
>- One more "fully-named" element with several attributes to "fill in the
>meaning":
>
><FinalEstimatedAmount yearType="CurrentYear" amountType="Budget">
>999.99</FinalEstimatedAmount>

Hi Joe,

The overall information model is more important than the decision whether 
to use elements or attributes - a simple-valued element and an attribute 
are not that different.

More important, I think, is understanding the relationship between years, 
budgets, estimates, etc. For instance, the concept "current year" does not 
apply to data for more than a year - do you really want it used everywhere? 
Which means that it is dangerous for me to try to answer your questions.

Also, what kind of processing are you doing? Design is a kind of 
optimization, as Tommie Usdin likes to point out, and until you know how 
you are using the markup, it is hard to know what to optimize. I like to 
mock up some data and try a bunch of queries on it.

And then there's a lot of taste. I often use an approach like your #2:

<final-estimate year="2003" type="budget">999.99</final-estimate>

But....is this a final estimate whose type is budget, or a budget whose 
type is final estimate? In my models, I would think the latter:

<budget year="2003" type="finalEstimate">999.99</budget>

Whatever design you choose, create sample data and play with it - how hard 
is it to create in your environment? How hard to query? How hard to write 
stylesheets for? Have you captured the relationship between the different 
"atoms" well?

Jonathan 


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.