an xml object database: design implementation and applications ching-long yeh 葉 慶 隆 department...

99
An XML Object Database: An XML Object Database: Design Implementation and Design Implementation and Applications Applications Ching-Long Yeh 葉 葉 葉 Department of Computer Science and Engin eering Tatung University Taipei 104, Taiwan ROC

Upload: russell-parks

Post on 05-Jan-2016

220 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

An XML Object Database: An XML Object Database: Design Implementation and ApplicationsDesign Implementation and Applications

Ching-Long Yeh 葉 慶 隆Department of Computer Science and Engineering

Tatung University

Taipei 104, Taiwan

ROC

Page 2: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

2

IntroductionIntroduction

• XML improves upon HTML in – capturing the meaning of a document and – extending the tag set.

• At the same time, it also reduces the complexity of SGML.

• It is believed that XML will soon be the standard of data exchanges on the Web.

Page 3: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

3

IntroductionIntroduction

• Due to lack of indices in files, we are not able to make full use of the meaning (or metadata) in an XML document, if it is stored in a file.

• Since an XML document can be easily viewed according to the object-oriented model, a promising solution is to employ object database technology to manage the access of XML documents.

Page 4: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

4

IntroductionIntroduction

• In this talk, I will present our research work in– the design and implementation of an XML object

DB, – an extensible template-based query interface to

accessing to XML object database, and– the applications implemented on the XML object

database• content-based video query system, and• electronic commerce

Page 5: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

5

The Remainder of the TalkThe Remainder of the Talk

• An Introduction to XML• Design and Implementation of an XML Object

Database• An Extensible Template-based Interface • A Content-Based Query Interface to Video Database• XML Object Database and Electronic Commerce

Page 6: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

An Introduction to XMLAn Introduction to XML

Page 7: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

7

HyperText Markup LanguageHyperText Markup Language

• HTML is a language used to create hyperlink text in the WWW.

• The text is presented according to a set of predefined tags.

• The definition of tags is based on the Document Type Definition (DTD) of SGML.

• In other words, HTML is an application of SGML in the WWW.

Page 8: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

8

• Central to SGML is the concept that documents have structurestructure, contentcontent, and formatformat.

• These three ingredients combine to form a document.

Standard Generalized Markup LanguageStandard Generalized Markup Language

Page 9: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

9

ContentContent

• What is Content?

– Content is the actual data within a document.

– The words and illustrations that make up a bicycle assembly

manual are its contents.

Page 10: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

10

FormatFormat

• What is Format?– Format consists of how the words, sentences, and

paragraphs are visually presentedvisually presented and distinguished from one another within a document.

– Boldface for title, italics for special terms, and blank lines between sections are examples of document formats.

– People often confuse format with structure.People often confuse format with structure.

Page 11: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

11

StructureStructure

• What is Structure?

Coconut Pudding

12 ounces coconut milk

4 to 6 tablespoons sugar

4 to 6 tablespoons cornstarch

3/4 cup water

Pour coconut milk into saucepan.

Combine sugar and cornstarch; stir in waterand blend well.

Stir sugar mixture into coconut milk; cook and stir over low heat until thickened.

Recipe

Title

IngredientList

Ingredient

InstructionList

Step

Page 12: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

12

Document Type DefinitionDocument Type Definition

• Defining structures in SGML– The structure of a document its type is defined by a

document type definition, or DTD.– The DTD lays out the rules for a document through the use

of elements, attributes, and entities.

Page 13: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

13

Document Type DefinitionDocument Type Definition

<!ELEMENT recipe -- ( title, ingredientList, instructionList)><!ELEMENT title -- (#PCDATA)><!ELEMENT ingredientList -- (ingredient*)><!ELEMENT instructionList -- (step*)><!ELEMENT ingredient -- (#PCDATA) ><!ELEMENT step -- (#PCDATA)>

• A DTD looks like

Page 14: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

14

Document InstanceDocument Instance

<!DOCTYPE RECIPE PUBLIC ”recipe" ”recipe"><RECIPE><TITLE>Coconut Pudding</TITLE><INGREDIENTLIST> <INGREDIENT> 12 ounces coconut milk</INGREDIENT> <INGREDIENT> 4 to 6 tablespoons sugar </INGREDIENT> <INGREDIENT> 4 to 6 tablespoons cornstarch </INGREDIENT> <INGREDIENT> 3/4 cup water </INGREDIENT><INGREDIENTLIST><INSTRUCTIONLIST>` <STEP> Pour coconut milk into saucepan. </STEP> <STEP>Combine sugar and cornstarch; stir in water and blend well. </STEP> <STEP>Stir sugar mixture into coconut milk; cook and stir over low heat until thickened. </STEP> …</INSTRUCTIONLIST></RECIPE>

Page 15: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

15

HTML, SGML, XMLHTML, SGML, XML

• HTML helped establish the Internet by providing a universal way to present information.

• However, HTML only addresses the presentation of data.

• Using SGML, user can add structure along with the content of a document.

• However, SGML has proven too heavy-weight for the Internet.

Page 16: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

16

Extensible Markup LanguageExtensible Markup Language

• The XML is a simple dialect of SGML.• HTML is sufficient for sending web pages that are

viewed by human beings.• XML, however, adds the tags that enable computers

to understand, act on or process the information.• XML has been designed for ease of implementation

and for interoperability with both SGML and HTML.

Page 17: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

17

XML Application ProfileXML Application Profile

• Electronic commerce• Electronic data interchange (EDI)• Fine-grain content publishing• Internet search engines• Distributed application design• etc.

Page 18: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

18

Data Type Requirements of DocumentsData Type Requirements of Documents

• HTML– One file per page– Simple uni-directional linking

• XML– Tens, hundreds or even thousands of objects per page– Multiple DTDs– Hierarchical structure and rich linking– Query and navigation capabilities required– Agents and business rules interact with the data

Page 19: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

19

Data Types of Storage Data Types of Storage File SystemFile System

• File system– Store monolithic stuff.– Folder system on top of them– Good at storing multimedia data

Page 20: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

20

Data Types of Storage Data Types of Storage Relational DBRelational DB

• Relational database– Tabular in nature– Good at storing rows and columns of data like

spreadsheets and data from forms like invoices.

Page 21: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

21

Data Types of Storage Data Types of Storage Object-Oriented DBObject-Oriented DB

• Object-oriented database– Good at managing structured, hierarchical rich

linked information.– That’s exactly what XML is.– XML is the object representation of data.

Page 22: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

Design and Implementation of an Design and Implementation of an XML Object DatabaseXML Object Database

Page 23: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

23

DTDparser

Schemagenerator

DI parsergenerator

DI parserand objectgenerator

DTD

DI

Schema definitions

Object definitions

XML repository

DBlanguageprocessor

produces

Schemageneration

rules

XMLrules

Parsergeneration

rules

structure

Userinterface

System ArchitectureSystem Architecture

Page 24: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

24

DTD ParserDTD Parser

elementdecl::= ’<!ELEMENT S Name S contentspec S? ‘>’

elementdecl(contentModel(N,C))--> elementPrefix, name(N), contentSpec(C), rightAngle.

contentspec::=‘EMPTY’| ‘ANY’| Mixed | children

contentSpec(C)-->empty,{C=’EMPTY’};any,{C={ANY’};mixed(C);children(C).

Page 25: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

25

Parsing ResultParsing Result<!ELEMENT top (p,spec,div1)><!ELEMENT p (#PCDATA|a|ul|b|i|em)*><!ELEMENT spec (front,body, back?)*><!ELEMENT div1 (head,(p|list1 |note)*, div2*)><!ELEMENT name (#PCDATA)><!ELEMENT a (#PCDATA)><!ELEMENT ul (#PCDATA)><!ELEMENT b (#PCDATA)><!ELEMENT i (#PCDATA)><!ELEMENT em (#PCDATA)><!ELEMENT front (#PCDATA)><!ELEMENT body (#PCDATA)><!ELEMENT back (#PCDATA)><!ELEMENT head (#PCDATA)><!ELEMENT list1 (#PCDATA)><!ELEMENT note (#PCDATA)><!ELEMENT div2 (#PCDATA)>

[contentModel(top,seq([p/null,spec /null,div1/null])/null),

contentModel(p,mixed([pcdata,a,ul,b,i,em])),

contentModel(spec,seq([front/null,body/null,back/question])/star),

contentModel(div1,seq([head/null,alt([p/null,list1/null,note/null]) /star,div2/star])/null),

contentModel(name,pcdata), contentModel(a,pcdata), contentModel(ul,pcdata), contentModel(b,pcdata), contentModel(i,pcdata), contentModel(em,pcdata), contentModel(front,pcdata), contentModel(body,pcdata), contentModel(back,pcdata), contentModel(head,pcdata), contentModel(list1,pcdata), contentModel(note,pcdata), contentModel(div2,pcdata)]

Page 26: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

26

Schema GenerationSchema Generation

defineClass 'Top' super: SingleSeq{ instance: 'P' 'p'; 'Spec' 'spec'; 'Div1' 'div1';};defineClass 'P' super: Mixed{ instance: List<Mixedp> mixedp;};defineClass Mixedp super: SingleAlt{ instance: String pcdata; 'A' 'a'; 'Ul' 'ul'; 'B' 'b'; 'I' 'i'; 'Em' 'em';};defineClass 'Spec' super: MultiSeq{ instance: List<Seqspec> seqspec;}; 

defineClass 'Seqspec' super: SingleSeq{ instance: 'Front' 'front'; 'Body' 'body'; 'Back' 'back';};defineClass 'Div1' super: SingleSeq{ instance: 'Head' 'head'; List<Alt1> 'alt1'; List<Div2> 'div2';};defineClass 'Alt1' super: SingleAlt{ instance: 'P' 'p'; 'List1' 'list1'; 'Note' 'note';};defineClass 'Name' super: Unstructured{ instance: String pcdata;}; ...

Page 27: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

27

DI ParserDI Parsertop(V) --> stg(top), p(P),spec(Spec),div1(Div1), etg(top).p(V) --> stg(p), mixedp(Mixedp),etg(p).mixedp(V) --> (pcdata(Pcdata); a(A);ul(Ul);b(B); I(I); em(Em);{false}), mixedp(_); [].spec(V) --> stg(spec), spec1(Spec), etg(spec).spec1(V) --> front(Front), body(Body), (back(Back);[ ]), spec1(_); [].

div1(V) --> stg(div1), head(Head), alt1(Alt1), div21(Div21), etg(div1).alt1(V) --> (p(P); list1(List1); note(Note); {false}), alt1(_); [].div21(V) --> div2(Div2), div21(_) ; [].name(V) --> stg(name), pcdata(Pcdata), etg(name).

Page 28: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

28

DI Parser GenerationDI Parser Generation

Rule_Head --> Start_Tag, Rule_Body, End_Tag, {Semantic Actions}.

for each contentModel(ElementName,ContentStructure) do generate the rule head for ElementName; generate the start tag for ElementName; generate the rule body for ContentStructure; generate the end tag for ElementName; generate the semantic action;

Page 29: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

29

ImplementationImplementation

• We have built a prototype of the system using LPA Win-Prolog V3.5 on personal computer.

• It consists of a DTD parser, Schema generator and DI parser generator.

• After creating the physical store and class family for XML documents, we can proceed to build the database schema for DTD by executing the ODQL codes generated by the DTD schema generator.

Page 30: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

30

Page 31: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

31

Page 32: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

32

An Extensible Query-By-Template Interface An Extensible Query-By-Template Interface to Accessing XML Document Databaseto Accessing XML Document Database

Page 33: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

33

MotivationMotivation

• Vastness of search results on current WWW search engines

• Textual-based query language with a simple English-like syntax is inconvenient for the user.

• Current user interfaces primarily use form-based queries.

Page 34: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

34

GoalGoal

• The goal is to design a convenient interface for user to access XML document without knowing the knowledge of the document types.

• The interface will relieve user from typing complex query language.

• The interface should be web-based and platform-independent.

Page 35: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

35

System ArchitectureSystem Architecture

Visual Query Interface

Page 36: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

36

Related KnowledgeRelated Knowledge

• XML( eXtensible Markup Language )• Jasmine Database• Structured Document Database • Visual Query Facility• Java Language

Page 37: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

37

XMLXML

• XML has the potential to be the standard of WWW document and electronic data interchange of the future.

• In XML, the structure of the document is defined using a Document Type Definition (DTD).

Page 38: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

38Recipe DTD

Page 39: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

39Recipe Document

Page 40: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

40

Jasmine DatabaseJasmine Database

• Jasmine is a multimedia object-oriented database management system(DBMS) with built-in Web-connectivity.

• It provides a powerful Object Data Query language(ODQL) which is very similar to the ODMG 2.0(ODL,OML,OQL) standard.

• It provides an extensive array of application development tools, which includes JADE, ActiveX, C-API, J-API, Weblink.

Page 41: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

41

Strucutured Document DatabaseStrucutured Document Database

• Combine structured document with OODB technology:– VERSO project at INRIA– News-On-Demand Application – Document Database from GMD-IPSI

• Other Related Document Database:– Open Text– DocBase – The Poet XML Repository– ODI’s eXcelon

Page 42: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

42

Visual Query FacilityVisual Query Facility

• Query By Example (QBE)– The interface is composed of tabular skeletons representing

tables in the database.

• Query By Forms (QBF)– The interface is presented with a list of searchable fields,

each with an entry area that can be used to indicate the search string.

• Query By Template (QBT)– The interface is displayed a template for a representative

entry of the database. User express their queries by indicating the search keywords in the appropriate regions of the template.

Page 43: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

43

Document Database SchemaDocument Database Schema

Page 44: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

44

Building an XML Document DatabaseBuilding an XML Document Database

Page 45: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

45

Example of Image-based QBTExample of Image-based QBT

Page 46: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

46

Limits of Image-based QBTLimits of Image-based QBT

• The image template is divided into regions, each of which corresponds to an element in the document structure.

• Associated with each regions is the query action. • Its significant drawback is the lack of flexibility in the

template creation.• It is difficult to automate the task of reconfiguration of

query action associate with the new template.• A single interface template for all types of document

is probably not a good idea.

Page 47: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

47

Concept of eXtensible QBT (XQBT)Concept of eXtensible QBT (XQBT)

• The environment provides a template creator which consists of a DTD schema browser and a scene for presentation design.

• The environment aims at providing automatic configuration of query actions associated with presentation of template.

• The design of the template presentation must be tightly coupled with the arrangement of document data stored in the repository.

• The component in the design of presentation must be properly associated with corresponding nodes in the object database schema.

Page 48: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

48

Environment for XQBTEnvironment for XQBT

Page 49: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

49

Template CreatorTemplate Creator

• The template creator consists of a DTD schema browser a scene for template draft, and functional area.

• The template creator in mainly relied on a DTD schema browser, which corresponds to the database schema.

• The scene is a visual display area where the designer can organize a template draft for certain purpose.

• The content of template draft is exported to a file, which contains the template presentation and additional information.

Page 50: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

50

Template CreatorTemplate Creator

Functional areaFunctional Area

Page 51: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

51

Exported FileExported File

• The file contains the information about the template presentation property associate with each element.

• Each element is appended with the path information in the database schema, in order that the template executor, which can make use of the information to carry out query actions.

Page 52: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

52

Template ExecutorTemplate Executor

• The template executor loads the exported file and presents the template as was originally designed in the template creator.

• The path of each node in the DTD schema browser is used to carry out the query action required by the user.

Page 53: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

53

XQBTQBT

Comparison between Image-based QBT and XQBTComparison between Image-based QBT and XQBT

• The template is an image by taking a photograph or by scanning from existing pages.

• The query action associate with each region is hand-coded.

• Either planar or nested template is limited to region level that is not very deep.

• The template is generated for a representative document.

• The associated query action can be generated automatically for the interface program.

• The designer can change the template to meet the requirement of various region level.

Page 54: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

54

ImplementationImplementation

• Java Proxies (Jp) for Jasmine– Jp allows developer to build their application in J-API, and ta

ke advantage of Jasmine class libraries.

Page 55: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

55

The interface for our XML document databaseThe interface for our XML document database

ingredient

Ingredientname

Ingredientstep

Page 56: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

56

Query FormulationQuery Formulation

– Such searches are performed by simply entering the search string in the corresponding region of the template.

Page 57: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

57

Query Formulation (cont.)Query Formulation (cont.)

Page 58: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

58

Query Formulation (cont.)Query Formulation (cont.)

• The multiple condition are specified in different regions which are combined using logical conjunctions(such as AND, OR, NOT).

• The approach used to derive the logical expression

from its graphical representation is using the default precedence.

• User can insert parentheses as necessary in the

condition box, which used in QBE interface.

Page 59: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

59

The results of the query formulationThe results of the query formulation

Page 60: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

60

Template CreatorTemplate Creator

Page 61: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

61

Template ExecutorTemplate Executor

Page 62: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

62

Future WorksFuture Works

• A first step towards enhancement is improved the

template ability in order to support more complex

query facility.• An enhancement of the template creator would

be to provide more sophisticated facility for manage

the template, such as layout, size, color, position, etc.• We will try to include other document types to test

the applicability of the XQBT.

Page 63: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

A Video Content Query SystemA Video Content Query SystemBased on an OODBBased on an OODB

Page 64: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

64

IntroductionIntroduction

• We store the content description of video in an OODB (Jasmine[CA]) to provide the user to query video segments according to the video content.

• A VDBMS needs to address the following important issues :

– Video data modeling– Video data insertion– Video data indexing– Video data query and retrieval

Page 65: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

65

• Overview of System Architecture

IntroductionIntroduction(cont.)(cont.)

Raw Video Data

Segmentation&

Annotation

Repository (databases)

Query Interface

Annotator User

Page 66: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

66

Related ResearchRelated Research

• R. Jain and A. Hampapur, “Metadata in Video Databases.”

– Application of Video– Query Dimensionality

• M. Carrer, L. Ligresti, G. Ahanger, and T.D.C. Little, “An Annotation Engine for Supporting Video Database Population.”

– Video Segmentation– A Newscast Video Data Model

Page 67: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

67

Related ResearchRelated Research

• E. Hwang and V. S. Subrahuanian, “Querying Video Libraries.”

– A Formal Model of Video Data Structures

• R. Hjelsvold and R. Midtstraum, “Modelling and Querying Video Data.”

– Structure of the Generic Video Data Model

Page 68: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

68

• Dublin Core-based Video Description Scheme– Hunter proposes to extend part of Dublin Core elements, i.e.,

Type, Description, Format, Relation, and Coverage, to cope with video content metadata requirements.

• Hunter breaks film and video documents into the following hierarchical segments:

Related ResearchRelated Research

Sequence Scene Shot Frame Object/Actor/Person

Page 69: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

69

Research IssuesResearch Issues

• Video Data Modeling– Characteristics of Video Data– Video Logical Structure– Content of Video Data

Shot

Scene SceneSequence

Video

Shot Shot

Page 70: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

70

Research IssuesResearch Issues

• Video data insertion– Extract key information– Break the given video stream into a set of basic

units.– Manually or semi-automatically annotate the video

unit.– Index and store video data into the video database

Page 71: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

71

• Video Data Indexing– Annotation-Based Indexing– Feature-Based Indexing– Domain-Specific Indexing

Research IssuesResearch Issues

Page 72: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

72

Research IssuesResearch Issues

• Video Data Query– Query content– Query matching type– Query granularity– Query behavior– Query specification

Page 73: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

73

Research IssuesResearch Issues

• Content Description Language– Every video subset of a video has a set of associated

objects and associated activities, which can be what we may describe.

– Content description language is used to describe the video content and video structure.

– An example is to describe video content by applying qualified Dublin Core to a hierarchical segmented video structure .

Page 74: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

74

System ArchitectureSystem Architecture

System Architecture

Page 75: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

Video Content Annotator

Video Player

OODB

Video Logical Structure and Content (ODQL

programs)

Users

Video Content Query Interface

Internet

Video Data

Video Entity Segment Program

Video Content Annotating Program

Video EntitySegment

XML Document

Page 76: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

76

System ArchitectureSystem Architecture

• Video Content Annotating Program– Output in two formats: one is in XML and the other

is in an object database language, the Object Data Query Language (ODQL) of Jasmine.

– The video content annotating program of the system employs a bottom-up approach to guide the human annotator to describe the content of video segments.

Page 77: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

77

System ArchitectureSystem Architecture

Video

Sequence

Scene

Shot

Bottom-Up

Page 78: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

78

System ArchitectureSystem Architecture

• Query Interface– The matching type used in the query interface is

keyword match, which is a kind of exact match.– The user specifies the keyword he or she wishes

to find in the value field of each attribute, the interface then looks for the content description of each SHOT in the object database in order to find the satisfied ones.

Page 79: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

79

ImplementationImplementation

• The Jasmine Object-Oriented Database– We use Jasmine OODB [CA] to store the video content description. – Jasmine provides the ODQL to define, manipulate, and query the

data in OODB – An ODQL program

SHOT shot0;shot0=SHOT.new(shotnumber:=0,name:="Shot_0",filename:="F:\\G.ARMANI\\Shot1.MPG",starttime:="00:00",stoptime:="00:13",comment:=comment0);

Page 80: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

80

ImplementationImplementation

• The Content Description of Fashion Show Video

<!ELEMENT VIDEO (ABSTRACT?,SEQUENCE+)> <!ELEMENT SEQUENCE (DESIGNER,SCENE+)> <!ELEMENT SCENE (TOPIC,BACKGROUND,SHOT+)> <!ELEMENT SHOT (CLOTHES+,ACCESSORY*)> <!ELEMENT ABSTRACT (#PCDATA)> <!ELEMENT BACKGROUND EMPTY><!ELEMENT CLOTHES EMPTY> <!ELEMENT ACCESSORY EMPTY><!ELEMENT DESIGNER EMPTY><!ELEMENT TOPIC EMPTY>

Page 81: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

81

ImplementationImplementation

<!ATTLIST SCENE scenenumber NUMBER #REQUIRED name CDATA #IMPLIED starttime CDATA #REQUIRED endtime CDATA #REQUIRED>

<! ATTLIST CLOTHES name CDATA #REQUIRED department CDATA #REQUIRED type (Men|Women|Children) “Men” color CDATA #REQUIRED season (Arbitrary|SpringSummer|FallWinter) “Arbitrary” fabric CDATA #IMPLIED narrative CDATA #IMPLIED >

Page 82: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei
Page 83: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

83

ImplementationImplementation

• Video Content Annotation Program

Page 84: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

84

ImplementationImplementation

Page 85: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei
Page 86: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei
Page 87: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei
Page 88: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

88

Video Content Query InterfaceVideo Content Query Interface

Page 89: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

89

ConclusionConclusion

• A video content-based query system• A hierarchical scheme for the content

descriptions of fashion show video• The content description of video is made by

using XML DTD.• The annotation of video content description

based on the scheme is stored in an object database

• We then build the form-based query interface on the object database.

Page 90: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

90

Future WorkFuture Work

• The problem of video transmission.• How detailed should we describe the video

content?• In the future we will develop a Query-By-Template

interface with key frame image, and an iterative query interface to allow user to incrementally refine their queries until the satisfying result is obtained.

• The study of how to produce the query interface automatically with different kinds of video.

Page 91: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

An Agent-Based EC System An Agent-Based EC System Based on an OODBBased on an OODB

Page 92: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

92

BackgroundBackground

• Software Agent• XML• KQML

Page 93: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

93

Software AgentSoftware Agent

• Properties:– Autonomous, Reactive, Goal-driven, Persistent, Social,

Intelligent, Mobile

• Agency:– A collection of software agents that communicate and

cooperate with each other is called an agency.

Page 94: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

94

XMLXML

• XML(eXtensible Markup Language) is a description language for structural documents; it is a markup language, but unlike HTML it does not keep a fixed set of tags.

Page 95: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

95

KQMLKQML

• KQML (Knowledge Query and Manipulation Language) is a language and protocol for exchanging information and knowledge. KQML is both a message format and a message-handling protocol to support run-time knowledge sharing among agents.

• A KQML message is called a performative, in that the message is intended to perform some action by virtue of being sent.

Page 96: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

96

System ArchitectureSystem Architecture

OODB

Agent states& properties

agent 1

Agency

UserInterface

Documents

(products,

services)

HistoryMessages

Manager 2

Reasoning

ResourceManager

MessageHandler

DocumentHandler

Rule Base KQMLInterpreter

agent 2

Authentication

Manager 1

agent

Page 97: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

97

AgencyAgency

• Agent• Facilator

– Authentication

– Message Handler

– Reasoning

– Document Handler

– Resource Manager

– KQML Interpreter

Page 98: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

98

Analysis of System ComponentsAnalysis of System Components

• Facilitator– authentication, create agents, delete agents, sleep agents,

resume agents, and communicate with others.

• Agent– action handling, display result, and communicate with

others.

• Message Handler– send message, receive message, and parse message.

Page 99: An XML Object Database: Design Implementation and Applications Ching-Long Yeh 葉 慶 隆 Department of Computer Science and Engineering Tatung University Taipei

XML Object Database and Applications 10/27/99 at NDMC

99

Future WorkFuture Work

• How the schema hierarchy of XML object database affects the performance of accessing the document.

• Extensible template-based query interface• Applications of XML object database in electronic

commerce