What's the motivation for stuffing an XML-like data structure into a U2 database? Is this just a thought experiment?
-Rob On Thu, Dec 9, 2010 at 5:35 PM, David A. Green <[email protected]>wrote: > If you can restrict the tag names to valid dictionary names you could do > something like: > > TAGS DICT: > 1052_MAKE > 1052_MODEL > 1052_AGE > > TAGS DATA: > 001 Chrysler > 002 LeBaron > 003 7 years and 3 days > > David A. Green > (480) 813-1725 > DAG Consulting > > -----Original Message----- > From: [email protected] > [mailto:[email protected]] On Behalf Of [email protected] > Sent: Thursday, December 09, 2010 3:10 PM > To: [email protected] > Subject: [U2] Sparse array population in Pick > > Years ago I had written a system, far predating XML, where the element-tags > were unpredictable. Essentially the user was allowed to create any tags > they wished, and any number of tags they wished, attached to another item. > > Each tag had an associated value. So far example > Zip Code = 95062 > > You could not however predict what tags a person would use, they were all > free-form and user-supplied, but you still had to store the tag with their > associated value. > > At the time I developed two ideas for how to do this in a Pick item > > TAGS1052 > 001 Make = Chrysler > 002 Model = LeBaron > 003 Age = 7 years and 3 days > > TAGS1052 > 001 Make]Model]Age > 002 Chrysler > 003 LeBaron > 004 7 years and 3 days > > The first model is clear. Anyone with no programming background at all, > can easily understand it, and also easily edit it. It suffers from > requiring > more elaborate programming than the second model, as you have to parse > every > > element. > > The second model is not quite as clear. You determine the attibute > position of the "value" by locate the tag in attribute 1 and then adding 1 > to it. > That gives you the attribute number where the value lives. Alternately you > could simply pre-fill attribute 1 with an initial null to push everything > forward 1 place, then you wouldn't have to add 1 after your locate. > > Comments? Critiques? Nasty cat-calls and grimaces? > > Will Johnson > > > _______________________________________________ > U2-Users mailing list > [email protected] > http://listserver.u2ug.org/mailman/listinfo/u2-users > > _______________________________________________ > U2-Users mailing list > [email protected] > http://listserver.u2ug.org/mailman/listinfo/u2-users > _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users
