Title: A Semantic Web XML Backend
1A Semantic Web XML Backend
? ? ???? (Chang Chiao-Chih) ??????? ?? (Dr.
Daniel J. Buchrer)
2Outline
- Semantic Web
- Background
- Server Implementation
- Performance
- Conclusion and Future Work
31. Semantic Web
- Make the Web as intelligent as possible
- Data and Information are readable by both humans
and machines - Include RDF, ontologies, agents, and database
4XML, RDF, Metadata, Ontologies and Data
Modeling Technologies
Database Technology Query, Metadata Storage
The Semantic Web
Information Management Technology
Agent Technology
5XML Backend
- Cadabia database management system
- Store data and information in XML documents
- Access, query, update, and make user account
62. Background
- Class Algebra Ontology
- eXist an Open Source Native XML Database
- Document Object Model (DOM)
- Problems I met
7Class Algebra Ontology
- Default Ontology
- OntologyDefn
- ClassDefn
- RelationDefn
- AttributeDefn
- User Objects
- IS-A Hierarchy
- Binary Relation
8(No Transcript)
9eXist
- An Open Source Native XML Database
- XMLDB API
- Data Storage
- B-tree
- Index
- ltcollection-id, name-idgt
- Query Language
- XPath 2.0 / XQuery 1.0
10Data Store Organization
Document d1
Node-id
Address
Node 1
Node 2
DOM Nodes
Document d2
Node-id
Address
Data pages
Multi-root B-tree
11Index Organization
ltPath-id, Doc-id,nodeOffsetgt
doc-id
node-id
node-id
doc-id
B-tree value array of node-ids separated by
doc-id
B-tree keys
12DOM
- Document Object Model
- Represent the document as objects
- Fundamental Interfaces
- Document
- Node
- Element
- Node List
- Text
13Document Node
lthasObjectDefnsgt ltStudentgt
ltnamegtStudent_Georgelt/namegt lt/Studentgt
ltStudentgt ltnamegtStudent_Tylarlt/namegt
lt/Studentgt lt/hasObjectDefnsgt
Document Root
NodeList
Element Node
lthasObjectDefnsgt
NodeList
Element Node
ltStudentgt
NodeList
Element Node
ltnamegt
NodeList
Element Node
ltStudentgt
Student_George
Text Node
NodeList
Element Node
ltnamegt
NodeList
Student_Tylar
Text Node
14Problems I met
- Class algebra ontology
- myOnto.xml
- http//XBean.cs.ccu.edu.tw/dan/ClassAlgebra/myOnt
o.xml - Installation and implementation of eXist
- Some jar files need to be added in environment
variables - Mailing list (http//www.exist-db.org)
- API in eXist
- Retrieve XML document from backend server
- more n1 text element nodes
- clearNodeFromDOM()
153. Server Implementation
- Server Architecture
- User/Collection Management
- Object Model
- System Interface
- XML Backend Services
16Server Architecture
- System Components
- J2SDK 1.4.1
- eXist 1.0beta1
- Java RMI
17Server Architecture
Local Users
Remote Users
API
Java RMI
eXist
XML Backend
18User/Collection Management
- Each User has his private directory (collection)
- Import the default ontology when creating a new
user account - Users can query, access, and update their data by
their developing ontology
19User/Collection Management
Class Algebra Ontology
collection
User N
User 1
User 2
.
Xml doc
Xml doc
Xml doc
Xml doc
Xml doc
Xml doc
Xml doc
Xml doc
Xml doc
resource
20Object Model
- Object Identifier
- Prefix, ClassName, ObjectName
- ltPrefix_ClassName_ObjectNamegt
- ltmy1_Teacher_dangt
- Data Structure
- 3-D like OidList
- my1TeacherAlexPetermy1StaffKaeJong
- myOntoClassDefnStudentmy1StudentGeorgeYvonn
e my2StudentDenencyWerZino
21Data Structure
class OidList String onto LinkedList
oidElements public class OidElement String
prefix String className LinkedList objNames
22Useful Methods on Data Structure
- OidList
- XML_ListSort()
- XML_mergeOidList()
- XML_removeOidList()
- XML_CheckOidIsEmpty()
- OidElement
- XML_addAllObject()
- XML_Sort
- XML_removeObjects
23System Interface
24XML Backend Services
- Query
- Add / Remove
- Update
- Security
- Others
25Query Service
- API getRelation() / getGrid()
- Translate every element in OidList to XPath query
and then merge the result. - The path is absolute, not relative.
- /hasObjectDefns/Teacher/ccu_Teacher_dan
- //ccu_Teacher_dan
26Add / Remove Service
- CheckExist()
- ensure if existing
- addDefn()
- create a new definition class to user ontology
- addObject
- create a new object to user instance file
- addPrefix()
- Create a new instance file to store data and
information - removeObject()
- Remove an instance object
27Update Service
- update()
- Update the attributes of the instance object.
- removeEdges()
- Remove some objects (oidlist) of the particular
relation - If the result is empty after removing, call
removeNode() - Else, call storeBack()
- mergeOidList()
- Merge the objects (oidlist) into the relation
content of the other object - Call storeBack() only
- storeBack()
- Check if the relation existing
- Yes, set the value of the node
- No, make a new node with the value
- removeNode()
- If the node is without any object, remove this
node
28Adding process
1. Add()
Object Identifier
Attributes
Relations
2. mergeOidList()
XML Backend
3. Store Back
29Removing process
3. removeObjects()
Object Identifier
Attributes
2. Store Back / removeNode
Relations
1. removeEdges()
XML Backend
304. Performance
- Experiments
- 2.0GHZ Intel Pentium 4
- 512MB DDR memory
- Windows XP
- J2SDK 1.4.1
- JUnit
- Testing
- Query
- Add
- Update
- Remove
31Query default ontology
32Query source data sizes
33Access Time (100 data)
34Access Time (300 data)
35Access Time (500 data)
36Comparison (Query)
37Comparison (Access)
38Comparison (All)
395. Conclusions
- XML document provides a way to represent
structured data without any additional
information. - Since XML documents are simply text files, they
may also be produced and consumed by legacy
systems. - The performance of query is pretty good, so it
can be distributed.
40Future Works
- Transaction support
- Distributed ontology importing
- Class Algebra Query Language
- Security management
- Heterogeneous source integration
41Thank You