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

Re: Separate the data model from presentation and make thedata

  • From: Ihe Onwuka <ihe.onwuka@gmail.com>
  • To: "Costello, Roger L." <costello@mitre.org>
  • Date: Sun, 22 Nov 2015 14:33:36 -0500

Re:  Separate the data model from presentation and make thedata


On Sun, Nov 22, 2015 at 12:47 PM, Costello, Roger L. <costello@mitre.org> wrote:
Hi Folks,

Assertion: Accessing/manipulating element nodes is simpler, easier, and faster than accessing/manipulating text. An element-based data model is better suited to XML's strengths than is a text-based data model.


<snipped/> 
    

use this as your data model:

        <living-room>
            <you/><are/><in/><the/><living-room./>

Problem no 1. Although you might get away with the full stop you are going to run into punctuation characters that you can't have in an XML element name? 
 
            <a/><wizard/><is/><snoring/><loudly/><on/><the/><couch./>
        </living-room>

and use the former only for presentation.

Do you agree?


In XPath 2.0 it is no great hardship to do a delimited tokenize to generate elements if you  wish so your arguments in favour look a bit anaemic. 

Now I have walked this walk before. 

In order to minimize XML payload size and get  indexing for free in eXist I  came up with the idea of representing the keywords tagged to a movie with an element

<movie>
  <drama/>
  <romance/>
</movie>

 rather than 

<keyword>drama</keyword>
 <keyword>action</keyword> 

or the denormalised <keyword>drama action</keyword>

eXist was having none of it as they have a limit on the number of distinct element (or is it node) names you can have in a database which I very quickly blew and my data wouldn't load.

I ended up coming to  the conclusion that a graph database was a better fit for what I was trying to accomplish.






[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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.