Combining UML, XML and relational database technologies: the best of all worlds for robust linguisti - PowerPoint PPT Presentation

1 / 39
About This Presentation
Title:

Combining UML, XML and relational database technologies: the best of all worlds for robust linguisti

Description:

IRCS 2001. Combining UML, XML and relational database technologies: ... Most importantly, XSL stylesheets can be used to transform the XMI document into ... – PowerPoint PPT presentation

Number of Views:351
Avg rating:3.0/5.0
Slides: 40
Provided by: larryh2
Category:

less

Transcript and Presenter's Notes

Title: Combining UML, XML and relational database technologies: the best of all worlds for robust linguisti


1
Combining UML, XML and relational database
technologiesthe best of all worlds for robust
linguistic databases
  • Larry HayashiJohn Hatton
  • SIL International

2
FieldWorks
3
Integrated data
Linguistic event(audio file)
4
Object-oriented design
  • Four stages
  • identify the classes and objects,
  • identify their semantics,
  • identify their relationships and
  • specify class and object interfaces and
    implementation.

5
UML Unified Modeling Language
  • Industry standard language for
  • Specifying
  • Visualizing
  • Constructing
  • Documenting
  • the artifacts of software systems
  • Supports OOD

6
A definition that summarizes the meaning of the
senses belonging to this entry.
7
(No Transcript)
8
(No Transcript)
9
UML Model Stored as XMI
10
What is XMI?
  • XMI XML Metadata Interchange
  • An XML schema or document type definition (DTD)
    for object modeling.
  • Purpose enable easy interchange of metadata
    between modeling tools based on UML
  • It is extremely verbose as UML can handle almost
    any data modeling requirement.

11
XMI is an instance of XML
  • Therefore standard XML operations can be carried
    out on the file.
  • Most importantly, XSL stylesheets can be used to
    transform the XMI document into other kinds of
    XML documents that can be used in the software
    development process.

12
Transforming XMI to HTML
Website click here.
13
Transforming XMI to RDBMS
14
Using a relational DB for OO models
  • Why use MSDE (SQL Server) instead of a true OODB?
  • Multiuser capabilities
  • MSDE supports up to 5 concurrent users
  • SQL Server supports 1000 of concurrent users
  • Robust technology
  • Inexpensive
  • MSDE freely distributable

15
Generating the relational db
XMI
16
(No Transcript)
17
OO Functionality in a RDB
  • Maintain notions of
  • Inheritance
  • Hierarchy
  • Details in the paper

18
Predefined views
LexSense_
Id
Guid
Class
Owner
These fields are
OwnFlid
inherited from
OwnOrd
superclass/table
UpdStmp
CmObject.
UpdDttm
MorphoSyntaxInfo
ScientificName
ScientificName_Fmt
SenseType
LexSense_Senses
LexSense_Definition
Src
Obj
Dst
Flid
Ord
Enc
Txt
Fmt
19
Getting data into the RDB
Validate against FieldWorks.xsd or FieldWorks.dtd
Shoebox or other data file
?
20
Transforming XMI
21
XML as a conduit
Parser
Relational

22
Getting XML out of SQL Server
  • XML Auto

SELECT ID, MorphoSyntaxInfoFROM LexSense
SELECT ID, MorphoSyntaxInfoFROM LexSenseFOR XML
AUTO
ltLexSense ID"1563" MorphoSyntaxInfo"1561"/gtltLex
Sense ID"1567" MorphoSyntaxInfo"1562"/gt
23
Getting XML out of SQL Server
  • XML Auto
  • XML Views

24
Define output schema
  • lt?xml version"1.0" encoding"UTF-8"?gt
  • ltxsschema
  • xmlnsxs"http//www.w3.org/2001/XMLSchema"
  • elementFormDefault"qualified"
    attributeFormDefault"unqualified"gt
  • ltxselement name"LexicalDatabase"gt
  • ltxscomplexTypegt
  • ltxssequencegt
  • ltxselement name"Entries"gt
  • ltxscomplexTypegt
  • ltxssequencegt
  • ltxselement ref"LexMajorEntry"
    maxOccurs"unbounded/gt
    lt/xssequencegt
  • lt/xscomplexTypegt
  • lt/xselementgt
  • lt/xssequencegt
  • ltxsattribute name"id" type"xsbyte"
    use"required"/gt
  • lt/xscomplexTypegt
  • lt/xselementgt

25
Define sqlannotations
  • lt?xml version"1.0" encoding"UTF-8"?gt
  • ltxsschema
  • xmlnsxs"http//www.w3.org/2001/XMLSchema"
  • elementFormDefault"qualified"
    attributeFormDefault"unqualified"gt
  • ltxselement name"LexicalDatabase"gt
  • ltxscomplexTypegt
  • ltxssequencegt
  • ltxselement name"Entries"gt
  • ltxscomplexTypegt
  • ltxssequencegt
  • ltxselement ref"LexMajorEntry"
    maxOccurs"unbounded/gt
    lt/xssequencegt
  • lt/xscomplexTypegt
  • lt/xselementgt
  • lt/xssequencegt
  • ltxsattribute name"id" type"xsbyte"
    use"required"/gt
  • lt/xscomplexTypegt
  • lt/xselementgt

lt?xml version"1.0" encoding"UTF-8"?gt ltxsschema
xmlnsxs"http//www.w3.org/2001/XMLSchema"
elementFormDefault"qualified"
attributeFormDefault"unqualified"gt ltxselement
nameLexicalDatabase sqlrelation"LexicalDataba
se_" gt ltxscomplexTypegt ltxssequencegt
ltxselement name"Entries"gt
ltxscomplexTypegt ltxssequencegt
ltxselement ref"LexMajorEntry"
maxOccurs"unbounded/gt
lt/xssequencegt lt/xscomplexTypegt
lt/xselementgt lt/xssequencegt
ltxsattribute name"id" type"xsbyte"
use"required"/gt lt/xscomplexTypegt
lt/xselementgt
lt?xml version"1.0" encoding"UTF-8"?gt ltxsschema
xmlnsxs"http//www.w3.org/2001/XMLSchema"
elementFormDefault"qualified"
attributeFormDefault"unqualified"gt ltxselement
nameLexicalDatabase" sqlrelation"LexicalDataba
se_" gt ltxscomplexTypegt ltxssequencegt
ltxselement name"Entries"
sqlis-constant"1" gt ltxscomplexTypegt
ltxssequencegt
ltxselement ref"LexMajorEntry"
maxOccurs"unbounded" sqlrelation"LexMajorEntr
y_" /gt lt/xssequencegt
lt/xscomplexTypegt lt/xselementgt
lt/xssequencegt ltxsattribute name"id"
type"xsbyte" use"required"/gt
lt/xscomplexTypegt lt/xselementgt
lt?xml version"1.0" encoding"UTF-8"?gt ltxsschema
xmlnsxs"http//www.w3.org/2001/XMLSchema"
elementFormDefault"qualified"
attributeFormDefault"unqualified"gt ltxselement
nameLexicalDatabase" sqlrelation"LexicalDataba
se_" gt ltxscomplexTypegt ltxssequencegt
ltxselement name"Entries"
sqlis-constant"1" gt ltxscomplexTypegt
ltxssequencegt
ltxselement ref"LexMajorEntry"
maxOccurs"unbounded/gt
lt/xssequencegt lt/xscomplexTypegt
lt/xselementgt lt/xssequencegt
ltxsattribute name"id" type"xsbyte"
use"required"/gt lt/xscomplexTypegt
lt/xselementgt
lt?xml version"1.0" encoding"UTF-8"?gt ltxsschema
xmlnsxs"http//www.w3.org/2001/XMLSchema"
elementFormDefault"qualified"
attributeFormDefault"unqualified"gt ltxselement
nameLexicalDatabase" sqlrelation"LexicalDataba
se_" gt ltxscomplexTypegt ltxssequencegt
ltxselement name"Entries"
sqlis-constant"1" gt ltxscomplexTypegt
ltxssequencegt
ltxselement ref"LexMajorEntry"
maxOccurs"unbounded" sqlrelation"LexMajorEntr
y_" /gt ltxsannotationgt ltxsappinfogt
ltsqlrelationship
parent"LexicalDatabase_"
parent-key"ID" child"LexMajorEntry_"
child-key"Owner"/gt
lt/xsappinfogt ...
lt/xsannotationgt
lt?xml version"1.0" encoding"UTF-8"?gt ltxsschema
xmlnssql"urnschemas-microsoft-commapping-schem
a" xmlnsxs"http//www.w3.org/2001/XMLSchema"
elementFormDefault"qualified"
attributeFormDefault"unqualified"gt ltxselement
nameLexicalDatabase" sqlrelation"LexicalDataba
se_" gt ltxscomplexTypegt ltxssequencegt
ltxselement name"Entries"
sqlis-constant"1" gt ltxscomplexTypegt
ltxssequencegt
ltxselement ref"LexMajorEntry"
maxOccurs"unbounded" sqlrelation"LexMajorEntr
y_" /gt ltxsannotationgt ltxsappinfogt
ltsqlrelationship
parent"LexicalDatabase_"
parent-key"ID" child"LexMajorEntry_"
child-key"Owner"/gt
lt/xsappinfogt ...
lt/xsannotationgt
26
Transforming XMI
27
XBrowse
LexicalDatabase/Entries
28
Problems with XML Views
  • Size of SQL Statement
  • Execution time
  • Solutions
  • Creating specific schemas for specific purposes
  • Using XML Views to help determine what SQL query
    should be and hard-coding the query

29
XPath and XQuery
  • SQL Server XML Views can only use XPath
  • XQuery, as an extension of XPath, is much more
    comprehensive and SQL-like.

30
Transforming XMI
31
Instant User Interfaces
  • Shoebox

32
Instant User Interfaces
  • Shoebox
  • Microsoft Access

33
Default interface spec in UML
  • Use UML tags

34
Example of FW Interface
35
Transforming XMI
36
Transforming XMI
37
  • ... constructing a useful mathematically-based
    model of an application area is one of the
    highest forms of analysis. Thus, providing a
    tool, language, framework, etc., that makes the
    result of such work available to thousands is a
    way for programmers and designers to escape the
    trap of becoming craftsmen of one-of-a-kind
    artifacts. Stroustrup (1997)

38
UML, XMI and XML
  • Summary
  • These tools and technologies can be used to
    capture systems analyses and resulting linguistic
    data models
  • These tools and technologies enable the analyst
    to produce well-documented visual models in a
    format that allow these artifacts to have greater
    longevity
  • XMI can be transformed into implementation
    specific products

39
UML, XMI and XML
  • Demonstrated how FieldWorks development uses UML
    and XMI in a SQL Server 2000 specific
    implementation
  • ... while recognizing that the UML models could
    be transformed into other implementation
    specific products (such as for PostgreSQL,
    CELLAR2)

40
The End
Write a Comment
User Comments (0)
About PowerShow.com