Download presentation
Presentation is loading. Please wait.
Published byDylan Dorsey Modified over 8 years ago
1
XML Database DBSI Lab.
2
Contents XML Outline Comparing XML and HTML XML Syntax XML as Database Sample Database diagram Generating XML Pages Using Basic SQL Generating XML in different database
3
XML VS HTML HTML File This is a simple HMTL page Once more unto the breach, dear friends, once more; or close the wall up with our English dead. In peace there's nothing so becomes a man as modest stillness and humility; but when th' blast of war blows in our ears, then imitate the action of the tiger: stiffen the sinews, summon up the blood, disguise fair nature with hard-favour'd rage; then lend the eye a terrible aspect. Cry 'Havoc !' and let slip the dogs of war, that this foul deed shall smell above the earth with carrion men, groaning for burial.
4
XML VS HTML XML File Frankfurt 43 52 London 31 45 Paris 620 74
5
XML Syntax XML tag: first line Including style sheets: optional second line Root node: next line, unique in a document Ending root node: last line Opening and closing elements
6
Element naming rules Reserved Characters in XML –, “, ‘, & –escape sequence should be used eg., < –alphanumeric characters; do not begin with a number or a punctuation characters –cannot contain any spaces –‘XML’ should not be included (eg, XML_1) –‘+’ or ‘-’ are OK but inadvisable Case sensitive
7
An XML Document is a Database XML is self-describing because it contains both data and metadata –XML elements and attributes describe the properties of data –Properly structured hierarchical XML document describes relationships between different types of data Disadvantages of using XML as a database –XML documents can include duplication and become verbose –Accessing XML documents will involve full scanning and parsing the potentially enormous text files Physical size of commercial implementations –Oracle or SQL Server: terabyte levels –Native XML databases: gigabyte levels Currently, XML databases are commercially appropriate to –small scale applications –small quantities of data –very few users –low security –low data integrity needs –low performance
8
Native XML Databases XML include both data and metadata, so XML document is a native XML database – Algeria Examples of native XML databases –Tamino –eXist –TigerLogic –XHive –XIndice –DBPrism
9
Sample Database Diagram
10
Generating XML Pages Using Basic SQL (1)
11
Generating XML Pages Using Basic SQL (2)
12
Generating XML Pages Using Basic SQL (3)
13
Generating XML Pages Using Basic SQL (4)
14
Generating XML Pages Using Basic SQL (5) Pseudo code:
15
Exercise: Pseudo code
16
Result :
17
In Oracle (1)
18
In Oracle (2)
19
In Oracle (3)
20
In Oracle (4)
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.