|
Summary
For object-oriented data, the relationship between parts and subassemblies is best described using the element approach.
Elements vs. Attributes with Object Oriented Data
Besides relational database data, we should also consider object-oriented data, which describes a physical object, such as a car or a wooden barrel. Like the student record, the data is highly structured. Every part and subassembly relate to the others.
For object-oriented data, the relationship between parts and subassemblies is best described using the element approach. For example,
<automobile modelno=OCC96 class=midsize> <name>Cutlass Ciera</name> <engine size=3.0l> <cylinders count=4 /> </engine> <wheels count=4 /> <doors> <door>driver <mirror /> <lock type=4 button combination /> <window /> </door> <door>front passenger <mirror>OBJECTS IN MIRROR ARE CLOSER THAN THEY APPEAR</mirror> <lock type=key /> <window /> <door /> <door>left rear <lock type=child safety /> <window openable=no /> </door> </doors> </automobile>
Example of an object-oriented approach for a 10 gallon wooden barrel:
<barrel capacity=10g material=wood> <hoops width=2in dia=2.5ft material=iron /> </barrel>
As you can see, both database-oriented and object-oriented data have little text. The data is highly structured and can be easily expressed in a tabular or hierarchical format. However, these highly structured examples would become semi-structured if the student record included teachers' comments or the automobile object included part descriptions and assembly instructions.
Excepts from XML Unlocks Information: How XML Accommodates Human-Authored Content
| Further additional information | |
Updating comments...
Updating comments...
|