semantic web & XML Flashcards
semantic web definition
extension of the world wide web through standards by the world wide web consortium, the standards promote common data formats and exchange protocols on the web,
about meaning rather than syntax which is about structure
proof and trust layers
proof layer- involves the actual deductive process as well as representation of proofs in web languages and proof validation
trust layer- emerge through the use of digital signatures and otherkinds of knowledge - certification, recommendation, security and the quality of information
XML
extensible markup language, metalanguage used to represent and manipulate data elements. similar to HTML in structure but XML is concerned with the description and representation of data, rather than with the way it is displayed
documents have tags giving extra information about sections of the documents
XML vs HTML
HTML tags describe how to render things on screen, XML tags describe what things are, HTML tags are designed for the human-computer interaction, wheras XML tags are designed for interaction between two computers, unlike HTML,XML tags tell you what the data means rather than how to display it
why XML for databases
one of the main reasons that XML was developed was to allow the exchange of semi-structured documents, like invoices, order forms, applications.. over the internet. using a database system to store XML documents allows users to be able to better access information XML is also very flexible, data is maintained in a self-describing format to accommodate a variety of ever-evolving business needs
XML database
database that stores XML documents, two major types of XML databases;
XML - enabled; these map all XML to a traditional database, accepting XML as input and rendering XML as output
native XML- the internal model of such databases depends on XML and uses XML documents as the fundamental unit of storage
XML model vs relational model
XML data is hierarchical
* XML data is self-describing
* XML data has inherent
ordering
* An XML database contains
collections
- Relational data is
represented in a model of
logical relationships - Relational data is not self-
describing - Relational data does not
have inherent ordering - A relational database
contains tables
relational model
order of rows is not guaranteed unless the ORDER BY clause is used in one or more columns, relations(tables), data is represented in n-ary relations. has a domain that represents a set of values. attributes (columns) strict schema, restrictive, the strict schema insures data integrity
xml model
hierarchical format, data is represented in tree structures, nodes, relationships between the nodes.
schema provides flexibility, easily modified format
XML document rules
XML documents must be well formatted, meaning that every opening
tag needs a closing tag (e.g. <Student> Marie </Student> )
* It allows users to define their own tags (unlike HTML)
* The XML tags need to be properly nested.
* The XML and xml tags are reserved for XML tags only.
* You can use <– XXX –> symbols for comments
* XML is case sensitive so, <Student> is not the same as <STUDENT>
* Two types of XML documents commonly used, Document Type
Definition (DTD) or an XML Schema Definitions (X</STUDENT></Student>
document type definition
DTDs can be declared inline of the XML code or can reference
an external file
* It provides the composition of the database’s logical model and
defines the syntax rules or valid tags for each type of XML
document
* A DTD is a file that has a .dtd extension
* This file describes XML elements
* Example on next slide