Native XML Database for Information Systems Chris Wallace IS School Research Seminar Feb 2006.

Slides:



Advertisements
Similar presentations
XML: Extensible Markup Language
Advertisements

The CEMS Faculty Information System Project 23 June 2006.
Copyright 2004 Monash University IMS5401 Web-based Systems Development Topic 2: Elements of the Web (g) Interactivity.
Introduction to XQuery and eXist Week 21 DSA. DSA - XQuery2 Refresher on XPath XML databases XQuery Applications –Whiskies (again) –A simple blog The.
Web Forms: Web Pages with Server Controls. 2 Objectives Understand the background of the Internet, and the notions of packet switching and a stateless.
XSLT XML DBs, and Schemas Week 18 DSA. The Whisky Case study XSLT can be applied in the client. –Add a xml processing instruction to the xml to bind to.
Native XML Database for Information Systems Chris Wallace ISD3 March 2006.
DSA Semester 2. XML Tagged data Hello A really interesting course, well taught Interchange of data RSS, BPEL4WS, RossettaNet … Structure document representation.
Learning Web development. 3(+1) Tier architecture PHP script Remote services Web Server (Apache, IIS) Browser (IE, FireFox, Opera) Desktop (PC or MAC)
IS 360 Course Introduction. Slide 2 What you will Learn (1) The role of Web servers and clients How to create HTML, XHTML, and HTML 5 pages suitable for.
B.Sc. Multimedia ComputingMedia Technologies Database Technologies.
Introduction to XQuery and eXist XQuery workshop April 2006.
Introduction to XQuery and eXist DSA. XSLT Tutorial Problems Bad language : – No ! – for XML schema –Some XSLT engines tolerant of extra tags (permissive),
Introduction to XQuery and eXist Week 17 DSA. DSA - XQuery2 XPath. Hierarchical file systems have been navigable with path expression since Unix –/abc/cde/../../efg.
XML Workshop XSLT. XML Tagged data Hello A really interesting course, well taught Interchange of data RSS, BPEL4WS, RossettaNet … Structure document representation.
Multiple Tiers in Action
Dynamic Web Pages Bert Wachsmuth. Review  Internet, IP addresses, ports, client-server, http, smtp  HTML, XHTML, XML  Style Sheets, external, internal,
Stanford University EH&S A Service Oriented Architecture For Rich Internet Applications Sheldon M. Heitz.
Native XML Database for Information Systems Chris Wallace SMRG Seminar Feb 2006.
ISD3 Semester 2. Review 3 tier web architecture – describe, explain, terminology, typical interactions SQL & PHP Extended ER models Interaction in human.
Chapter 7 Managing Data Sources. ASP.NET 2.0, Third Edition2.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
Overview of Search Engines
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
Web Programming Language Dr. Ken Cosh Week 1 (Introduction)
Quick Tour of the Web Technologies: The BIG picture LECTURE A bird’s eye view of the different web technologies that we shall explore and study.
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
Semantic Sensor/Device Description System EEEM042-Mobile Applications and Web Services Assignment- Spring Semester 2015 Prof. Klaus Moessner, Dr Payam.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Server- Side technologies Client-side vs. Server-side scripts PHP basic ASP.NET basic ColdFusion.
ITIS 1210 Introduction to Web-Based Information Systems Chapter 24 How Websites Work with Databases How Websites Work with Databases.
Santosh Ghimire – 066 BCT 533 Subit Raj Pokharel – 066 BCT 538 Sudip Kafle – 066 BCT
Web Application Architecture and Communication. Displaying a Web page in a Browser
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
Languages in WEB Presented by: Jenisha Kshatriya BCM SS09.
XForms: A case study Rajiv Shivane & Pavitar Singh.
JavaScript, Fifth Edition Chapter 1 Introduction to JavaScript.
SednaSpace A software development platform for all delivers SOA and BPM.
DATABASE and XML Moussa Mané. Learning Objectives ● Learn about Native XML Databases ● Learn about the conversion technology available ● Understand New.
XP New Perspectives on XML Tutorial 6 1 TUTORIAL 6 XSLT Tutorial – Carey ISBN
XP New Perspectives on XML, 2 nd Edition Tutorial 10 1 WORKING WITH THE DOCUMENT OBJECT MODEL TUTORIAL 10.
Tutorial 1 Getting Started with Adobe Dreamweaver CS3
JavaScript is a client-side scripting language. Programs run in the web browser on the client's computer. (PHP, in contrast, is a server-side scripting.
Fundamentals of Database Chapter 7 Database Technologies.
Client side web programming Introduction Jaana Holvikivi, DSc. School of ICT.
National Center for Supercomputing Applications NCSA OPIE Presentation November 2000.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
Mike Jackson EPCC OGSA-DAI Architecture + Extensibility OGSA-DAI Tutorial GGF17, Tokyo.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
CS779 Term Project Steve Shoyer Section 5 December 9, 2006 Week 6.
Web Design and Development. World Wide Web  World Wide Web (WWW or W3), collection of globally distributed text and multimedia documents and files 
Rolando Gaytan Clay Schumacher Josh Weisskopf Cory Simon Aaron Steil (Reiman Gardens) – Client Dr. Tien Nguyen - Advisor.
 Web pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
Rich Internet Applications 2. Core JavaScript. The importance of JavaScript Many choices open to the developer for server-side Can choose server technology.
XML Databases. XML Like HTML –Tags –Fixed vocabulary of tags and fixed structure –Tags indicate formatting, not semantics Strict HTML – XHTML –Always.
JavaScript Introduction and Background. 2 Web languages Three formal languages HTML JavaScript CSS Three different tasks Document description Client-side.
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
Basics Components of Web Design & Development Basics, Components, Design and Development.
Apache Cocoon – XML Publishing Framework 데이터베이스 연구실 박사 1 학기 이 세영.
//liveVirtualacademy2011/ What’s New for ASP.NET 4.5 and Web Development in Visual Studio 11 Developer Preview Γιώργος Καπνιάς MVP, MCT, MCDP, MCDBA, MCTS,
Presented by: K.AMARNATH Ht.no:10841f0045 Guided by: T.Suneetha.
Business rules.
XML: Extensible Markup Language
Introduction to Dynamic Web Programming
Introduction and Principles
PHP / MySQL Introduction
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
CS4433 Database Systems Project.
Web Application Development Using PHP
Presentation transcript:

Native XML Database for Information Systems Chris Wallace IS School Research Seminar Feb 2006

Chris Wallace, IS School Research Seminar, Feb Exploring the design space “design as a conversation with the materials in the situation” (Schon) Native XML database (NXD) –Storing, querying and updating XML documents without mapping into relations –Schema-free –Trees are to NXD what tables are to RDBMS –Tables are trees Information Systems –Focus on semi-structured data (mixture of simple data items, text and complex nested structures) –Searching, derived data, visualisation –Process support –Large problem space variously supported by spreadsheets, word documents, ad-hoc databases, increasingly web-integrated data.

Chris Wallace, IS School Research Seminar, Feb eXist Native XML Database Open source Java European team of developers led by Wolfgang Meier Documents (files) are organised in collections (folders) in a file store –XML Documents stored in an efficient, B+ tree structure with indexes –Non-XML resources (XQuery, CSS, JPEG..), etc can be stored as binary Deployable in different ways –Embedded in a Java application –Part of a Cocoon pipeline –As web application in Apache/Tomcat –With embedded Jetty HTTPserver (as on stocks) Multiple Interfaces –REST – to Java servlet –SOAP –XML:RPC

Chris Wallace, IS School Research Seminar, Feb NXD case studies FOLD –modules, programmes, scheme operations, staff, organisational structures, events Family photos and history –Integration of meta-data on family photos with family history (births, deaths and marriages)meta-databirths, deaths and marriages ISD3 Assignment –a web-based calculator –e.g. a currency convertercurrency converter The language patterns book

Chris Wallace, IS School Research Seminar, Feb ISD3 Coursework Develop a simple web-based calculator Not just a programming exercise –User interface design Users language, units, not raw data User interaction design –Data design choice of representation of domain facts –Veracity Relationship between data in database and domain being modelled How is veracity monitored and maintained –Process Examine some of the XP processes –Test-driven development

Chris Wallace, IS School Research Seminar, Feb Application Design Data model is one simple table: –Currency code, name and symbol –Latest conversion rates from GBP to currency X Currency Coding –Use ISO4217 e.g. XE.COM list ISO4217XE.COM list Core algorithm: –Conversion from N X to ? Y is N * rate(X to GBP) * rate(GBP to Y) i.e. N * (1/rate (GBP to X) * rate(GBP to Y) Currency rates to be updated by an administrator – (not via a web-service) Interface is to be a sticky form: –Input form and output result on one page –Input form default values from last input Veracity management –Rates must be dated and sourced –

Chris Wallace, IS School Research Seminar, Feb Technical Decisions Choice of platform: –PL/SQL and Oracle –ASP.NET and SQL Server –JSP (Java Servlet Page) and JDBC to Postgres(say) –PHP and MySQL –XML and Native XML Database (eXist) Calculation location: –client-side in ECMAScript (aka JavaScript) –server-side with/without Ajax

Chris Wallace, IS School Research Seminar, Feb Two approaches PHP-MySQL –Define and create MySQL table –Write PHP script to provide interface and access the database using SQL –Write editor for the Currency table XML –Create MS Excel spreadsheet of currencies –Convert to XML in Excel and save –Write XQuery script to provide interface

Chris Wallace, IS School Research Seminar, Feb Development Process for currency converter XP Practices: –‘Spike’ Simple end to end implementation –Incremental development Setup eXist databaseeXist database –Using the Admin interface: Create a directory for application Create a subdirectory for currency data Create XML dataset(s) in Excel Upload to eXist Write the XQuery script cur.xqlcur.xql Upload to eXist Execute in browser

Chris Wallace, IS School Research Seminar, Feb Currency Data in XML Start MS Excel 2003 Create the spreadsheet with column headings Convert to List (needs XML add-in) Save as XML dataXML data CodeNameRate GBPSterling1 USDUS Dollars EUREuro NZDNZ Dollars JPYYen

Chris Wallace, IS School Research Seminar, Feb XQuery W3C candidate recommendation – Designed by, amongst others, Don Chamberlin – rlin.pdfhttp:// rlin.pdf A functional programming Language –Based on XPath (tree-access language) –Integrate, select, update, compute and construct XML documents –cf PL/SQL

Chris Wallace, IS School Research Seminar, Feb Write the XQuery script Use the admin interface to test simple queries Use a syntax aware editor if possible –JEdit –Dreamweaver –Java Client interface to eXist –PFE32

Chris Wallace, IS School Research Seminar, Feb Executing an XQuery eXist DB cur.xql XQuery Engine parameters html Client BrowsereXist: Server Get cur.xql + parameters servlet fetch cur.xql render User clicks link cur.xql?fromAmount=100&fromCode=USD&toCode=EUR XSLT

Chris Wallace, IS School Research Seminar, Feb XQuery Script (1) declare namespace request=" let $fromAmount := request:request-parameter("fromAmount",“100"), $fromCode := request:request-parameter("fromCode","GBP"), $toCode := request:request-parameter("toCode","EUR"), $currencies := doc('/db/calculator/currencyTable.xml')//Currency, $fromCurrency := $currencies[Code=$fromCode], $toCurrency := $currencies[Code=$toCode], $toAmount := round(xs:decimal($fromAmount) * xs:decimal($toCurrency/Rate) div xs:decimal($fromCurrency/Rate) ) return

Chris Wallace, IS School Research Seminar, Feb XQuery Script (1) declare namespace request=" let $fromAmount := request:request-parameter("fromAmount",“100"), $fromCode := request:request-parameter("fromCode","GBP"), $toCode := request:request-parameter("toCode","EUR"), $currencies := doc('/db/calculator/currencyTable.xml')//Currency, $fromCurrency := $currencies[Code=$fromCode], $toCurrency := $currencies[Code=$toCode], $toAmount := round(xs:decimal($fromAmount) * xs:decimal($toCurrency/Rate) div xs:decimal($fromCurrency/Rate) ) return … Default Return node sequence of all Currency elements in this doc Filter Condition Cast

Chris Wallace, IS School Research Seminar, Feb XQuery Script (2) return Currency Calculator Currency Calculator Amount to Convert <input type="text" name="fromAmount“ value="{$fromAmount}"/> Embedded XQuery XML Current script is called by default

Chris Wallace, IS School Research Seminar, Feb XQuery (3) From Currency {for $currency in $currencies let $code := data($currency/Code), $name := data($currency/Name) return if ($code = $fromCode) then {$name} else {$name} } FLWOR expression conditional

Chris Wallace, IS School Research Seminar, Feb XQuery (4) Converts to {$toAmount} Switch to XQuery again, In PHP this would be either $toAmount (if in PHP) or (if in HTML)

Chris Wallace, IS School Research Seminar, Feb Round two - enhancements Add another currency –ZAR Rand Add new columns –Meta data to convey the accuracy, timeliness and origin of the data itself –Source and date/time Update spreadsheet –Add columns and data Update XQuery script – cur2.xqlXQuery script cur2.xql –Add source – Sources and oldest date

Chris Wallace, IS School Research Seminar, Feb Round 3 – Currency Table Same document used for different purpose: –currency.xslcurrency.xsl –curtable.xqlcurtable.xql –Run it curtable.xqlcurtable.xql

Chris Wallace, IS School Research Seminar, Feb The Language Patterns book Local / Web-basedLocalWeb-based Work-in-progress Should be converted to XML –currently organised by Pattern –Language –But should be able to be viewed as Language –Pattern –An XML database would solve this problem As an exercise for next week, you will extend the number of languages with ActionScript –Get you familiar with the on-line book –Extend the book