Describe and discuss the logical modelling of data in the context of XML, giving examples.
# Data modelling is the process of structuring and organizing data so it can be exercised easily by databases.
Logical data modelling is one of the types of Data modelling. It is a representation of data, organized in terms of entities and relationships and is independent of any particular data management technology. It will also help to describe what elements will be and which namespaces and attributes to be used in much clear way. It is also suggested that having separate elements is better than having attributes in case of XML. For example,
<student degree=”undergraduate”>
<course> BSc Computer Science </course>
</student>
This XML document can also be expressed as;
< student >
<degree> undergraduate </degree>
<course> BSc Computer Science </course>
</ student >
The data model for XML is simple straightforward and simple – or abstract, depending on one’s point of view. XML gives a baseline on which more complex models can be built. XML is hierarchical, it is easy to capture the relationships between the different data object in a natural, human readable format. There are number of XML data models. For example, DOM, SAX, XPath 1.0, etc and the common in all these are ordered trees of nodes (elements, attributes, text, etc) and scalar values.
The main structure of an XML document is tree-like and most of the lexical structure is devoted to defining that tree, but there is also a way to make connections between arbitrary nodes in a tree. For example, in the following document there is a root node with three children, but one of the children has a link to one of the other children:
<Computer Science>
< Course id="CMT3333">Project</Course >
< Course id="CMT3315">Advance web technology</Course >
< Course id="CMT3313">Web development and design</Course >
</Computer Science >
The tree corresponding to this document can be visualized as follows:
No comments:
Post a Comment