chelsom2

Uploaded from authorPOINTLite
Views:
 
Category: Entertainment
     
 

Presentation Description

No description available.

Comments

Presentation Transcript

Database or Document Schemas?: 

Database or Document Schemas? Choosing the Right Tools for the Job John Chelsom, CSW Group Ltd john.chelsom@csw.co.uk

Database or Document Schemas?: 

Database or Document Schemas? How to choose the right tools for the job Applications with databases and XML Modeling an application (example) As information-driven application As a document-driven application Which is the right approach? Architecture decisions in real life When to use which approach

Application Architectures: 

Application Architectures With XML and Databases

Multi-tiered Application: 

Multi-tiered Application

Multi-tiered XML Application: 

Multi-tiered XML Application XML may exist at any tier Generated by Presentation tier, manipulated on client Generated by business objects, manipulated in XML tier Manipulated by business objects Generated in data access tier Stored in database

Three Types of XML Database: 

Three Types of XML Database XML generating database deliver XML generated from database XML document database store documents or fragments in the database XML component database decompose XML document to database objects

XML Generating Database: 

XML Generating Database Information structured in database, not documents Driven by database schema, not XML schema/DTD Database and XML schema must be developed together Database structures updated without XML processing But may hold fragments of XML Generates XML on output XML awareness in extraction process (e.g. JSP)

Using SQL Server 2000: 

Using SQL Server 2000

XML Document Database: 

XML Document Database Information structured as XML documents XML schema/DTD defines data structures database schema is for document management Stores sets of elements and entities (documents) Stores document configurations Build lists, Use by Reference Can import and export complete XML documents

Using Oracle: 

Using Oracle

XML Component Database: 

XML Component Database Stores XML documents, elements, entities Structures information as XML object hierarchy Can address and access XML objects at any level Imports and exports documents and fragments Has full XML awareness

Astoria (Lightspeed): 

Astoria (Lightspeed)

Database Technology: 

Database Technology Not the same as the conceptual types of XML database we’ve just seen Relational databases Object oriented databases Native XML databases

XML Applications with RDBMS: 

XML Applications with RDBMS XML from business objects Business objects from XML Potentially two levels of data transformation RDBMS vendors are moving to add XML Type support

XML Applications with ODBMS: 

XML Applications with ODBMS XML data is inherently object-oriented Can be mapped to objects and stored persistently that may mean a relational database with O-O middleware

Applications with Native XML DB: 

Applications with Native XML DB XML data written directly to disk May (ultimately) be the most efficient systems All data must be in XML Products are extending to handle relational data and SQL queries

An Example Application: 

An Example Application Simple news event information system

Use Case: 

Use Case News items can originate from many sources usually a single news item originates from a single source but sometimes it can be from several One or more Creators write the news item consists of a headline and paragraphs of text Creators may include some material from Contributors The Creator adds meta data to the news item subject, country where event occurred, publication date Once completed, the news item is distributed to clients through two different channels As HTML through a web site, customised for user profile/preferences the user specifies the subjects and countries they are interested in As XML through a news feed filtered by subject, country and publication date

XML is a Standard, Sort Of: 

XML is a Standard, Sort Of XML is a meta language Each XML application uses a particular XML vocabulary Every business and application could define its own data structures This can be time consuming and expensive Use industry standards where possible “I'm not offended by all the dumb blonde jokes because I know I'm not dumb ... and I also know that I'm not blonde.” Dolly Parton

Used NewsML, a Bit: 

Used NewsML, a Bit International Press Telecommunications Council www.iptc.org

Information Driven Application: 

Information Driven Application Data model is in database schema Relational schema tables, data types, relations Object schema classes, properties, inheritance Schema XML DTD or Schema

Implementation Decisions: 

Implementation Decisions We will design our news events system as A data-driven application Using an XML generating database On relational database technology

Application Architecture: 

Application Architecture

Application Design/Development: 

Application Design/Development Create UML Class diagram Generate code stubs for business objects Create relational database schema Write code to instantiate business objects from database Create XML Schema Write code to map from business objects to XML Write XSL-T to create client interaction

Relational Database: 

Relational Database

XML Schema: 

XML Schema

XML Document: 

XML Document

Document Driven Application: 

Document Driven Application Database acts as a document manager versions document configuration cross reference and link management document variants (e.g. languages) XML DTD or Schema Data schema is the XML DTD or schema

Implementation Decisions: 

Implementation Decisions We will now design our news events system as A document-driven application Using an XML component database On native XML database technology

Application Architecture: 

Application Architecture

Application Design/Development: 

Application Design/Development Create XML Schema Create code to load XML to and from the database Or use a product that does this for you Create code to manipulate XML data as Business Objects Write XSLT to create client interaction

XML Schema: 

XML Schema

XML Document - Catalog: 

XML Document - Catalog

XML Document – News Item: 

XML Document – News Item

Choosing the Right Approach: 

Choosing the Right Approach

There is No Right Answer: 

There is No Right Answer You could probably build any system using any architectural approach (eventually)

Some Real Life Decisions: 

Some Real Life Decisions Jaguar Cars Dealer training material Stemcor Steel trading system UK National Health Service Electronic health records

Slide38: 

Jaguar Training Guides

Slide39: 

Locating and Reusing Graphics

Structured Authoring: 

Structured Authoring

Slide41: 

Automated Pagination

System Architecture: 

System Architecture

Jaguar System Design: 

Jaguar System Design A typical technical document management system Authors work with an XML editor Documents are controlled at ‘lesson’ level (ie in quite large chunks) Document-driven Using an XML Document Database (actually used a component manager, but this wasn’t really necessary) On an object-oriented database

Steel Trading System: 

Steel Trading System

System Architecture: 

System Architecture Third Party Trading System XSL

Stemcor System Design: 

Stemcor System Design A typical information management system Use forms to enter and view information about offers to buy and sell steel Information could be passed to online exchanges Information-driven UML design, Java business objects Oracle relational database XML in presentation tier only (XML generating database)

Slide47: 

Integrated Care Records

Viewing The Full Record: 

Viewing The Full Record

Viewing an Event: 

Viewing an Event

Health Records Design: 

Health Records Design A complex, large scale information management system Basic model of patients, episodes and events Events pass as XML messages between applications (HL7) Access control and security model with complex dependencies Uses a hybrid data/document approach Built on a single relational database Basic model is UML/relational Access control/security is UML/relational Manifests as XACML documents XML generating database Health events modelled as documents XML document manager

Information Model: 

Information Model Legacy database systems in place Read and write access to fine grained data items need locking and transactions Many connections (relationships) between individual data items XML needed only for presentation and information exchange

Document Model: 

Document Model Information is to be updated in an XML editor Locking at document level Limited or controlled reuse of components Information is read only Information is structured naturally as object collections, with limited connection between objects The schema needs to be flexible accommodate different data structures Formal data management without database schema changes

Thanks: 

Thanks Slides will be available online at john.chelsom@csw.co.uk www.csw.co.uk