Title: Combining UML, XML and relational database technologies: the best of all worlds for robust linguisti
1Combining UML, XML and relational database
technologiesthe best of all worlds for robust
linguistic databases
- Larry HayashiJohn Hatton
- SIL International
2FieldWorks
3Integrated data
Linguistic event(audio file)
4Object-oriented design
- Four stages
- identify the classes and objects,
- identify their semantics,
- identify their relationships and
- specify class and object interfaces and
implementation.
5UML Unified Modeling Language
- Industry standard language for
- Specifying
- Visualizing
- Constructing
- Documenting
- the artifacts of software systems
- Supports OOD
6A definition that summarizes the meaning of the
senses belonging to this entry.
7(No Transcript)
8(No Transcript)
9UML Model Stored as XMI
10What 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.
11XMI 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.
12Transforming XMI to HTML
Website click here.
13Transforming XMI to RDBMS
14Using 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
15Generating the relational db
XMI
16(No Transcript)
17OO Functionality in a RDB
- Maintain notions of
- Inheritance
- Hierarchy
- Details in the paper
18Predefined 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
19Getting data into the RDB
Validate against FieldWorks.xsd or FieldWorks.dtd
Shoebox or other data file
?
20Transforming XMI
21XML as a conduit
Parser
Relational
22Getting XML out of SQL Server
SELECT ID, MorphoSyntaxInfoFROM LexSense
SELECT ID, MorphoSyntaxInfoFROM LexSenseFOR XML
AUTO
ltLexSense ID"1563" MorphoSyntaxInfo"1561"/gtltLex
Sense ID"1567" MorphoSyntaxInfo"1562"/gt
23Getting XML out of SQL Server
24Define 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
25Define 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
26Transforming XMI
27XBrowse
LexicalDatabase/Entries
28Problems 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
29XPath and XQuery
- SQL Server XML Views can only use XPath
- XQuery, as an extension of XPath, is much more
comprehensive and SQL-like.
30Transforming XMI
31Instant User Interfaces
32Instant User Interfaces
33Default interface spec in UML
34Example of FW Interface
35Transforming XMI
36Transforming 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)
38UML, 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
39UML, 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)
40The End