27
ER2004, Shanghai, China Enterprise Modeling with Conceptual XML Stephen W. Liddle Rollins Center for eBusiness and School of Accountancy & Information Systems David W. Embley & Reema Al-Kamha Department of Computer Science Brigham Young University, Provo, Utah, USA

ER2004, Shanghai, China Enterprise Modeling with Conceptual XML Stephen W. Liddle Rollins Center for eBusiness and School of Accountancy & Information

  • View
    214

  • Download
    0

Embed Size (px)

Citation preview

ER2004, Shanghai, China

Enterprise Modeling with Conceptual XML

Stephen W. LiddleRollins Center for eBusiness andSchool of Accountancy & Information Systems

David W. Embley & Reema Al-KamhaDepartment of Computer Science

Brigham Young University, Provo, Utah, USA

11 Nov 2004 ER2004, Shanghai, China 2

XML for Fun and Profit

The benefits of XML are clear: Great for hierarchical, mostly human-readable,

textual data Meta-data travels with the data Standardized, “commoditized” data interchange

XML enjoys a significant “network effect” Value of XML = O(n2), where n is number of users

11 Nov 2004 ER2004, Shanghai, China 3

Death by a Thousand Paper Cuts But XML also has disadvantages:

(Aside from minor issues like query-processing and storage efficiency concerns)

Schema definitions are complex and numerous Details can be laborious, tedious Allows arbitrary amounts of heterogeneity The number of schemata increases geometrically

Thanks to the network effect, XML is ubiquitous

Rigid tree structure influences XML data modeling

11 Nov 2004 ER2004, Shanghai, China 4

The Modern Enterprise

Remote DivisionsRemote Divisions& Employees& Employees

CustomersCustomers

EmployeesEmployees

SuppliersSuppliers

DistributorsDistributors& Channel& ChannelPartnersPartners

StrategicStrategicPartnersPartners

ERPERP

Supply ChainSupply ChainManagementManagement

CRM andCRM andSupportSupport

EmployeeEmployeeSystemsSystems

PartnerPartner& Channel& Channel

ManagementManagementFIREWALL

From Carey, Enterprise Information Integration – XML to the Rescue!, ER2003

Wide variety of data sourcesIncreasing heterogeneityIncreasing need for integration

11 Nov 2004 ER2004, Shanghai, China 5

Model-Driven Nirvana OMG’s Model-Driven Architecture (MDA) hopes to lead us to the Promised Land Vision: integrate all assets into one enterprise-wide,

global information appliance by separating business logic from platform technology

Reverse-engineer legacy components Semi-automated (at best)

Platform-Platform-Independent Independent

ModelModel

TranslateTranslatePlatform-Platform-SpecificSpecificModelModel

ExecutableSystem

AbstractModel

AutomatedMapping

11 Nov 2004 ER2004, Shanghai, China 6

Mike Carey’s ER2003 Challenge to theConceptual Modeling Community Produce a simple conceptual model that:

Works well with XML and XML Schema Abstracts well for conceptual entities and

relationships Scales to handle large data sets and complex

object interrelationships Allows for queries and defined views via XQuery Accommodates heterogeneity

11 Nov 2004 ER2004, Shanghai, China 7

Our Vision: Conceptual XML

We have an answer to the challenge! Collectively we’ve been developing it for 30 years

Conceptual XML (C-XML) is a conceptual model: High-level object and relationship sets Seamless abstraction “Model-equivalent” with XML Schema

11 Nov 2004 ER2004, Shanghai, China 8

How C-XML Helps the EnterpriseEnterprise Application InfrastructureEnterprise Application Infrastructure

Standards-basedStandards-based XML-compliantXML-compliant

C-XML Model Management LayerC-XML Model Management Layer Supports conceptual abstractionsSupports conceptual abstractions Integrates XML Schema, XQuery views into enterprise viewIntegrates XML Schema, XQuery views into enterprise view

DataDataSourceSource

XML ViewXML View

DataDataSourceSource

XML ViewXML View

DataDataSourceSource

XML ViewXML View

DataDataSourceSource

XML ViewXML View

11 Nov 2004 ER2004, Shanghai, China 9

C-XML ExampleData frame annotations are not shown

11 Nov 2004 ER2004, Shanghai, China 10

C-XMLXML Schema Translations We need information- and constraint-

preserving translations in both directions Translations need not be inverses

It is sufficient that they create equivalence classes

Our community has created numerous XML generation algorithms But there hasn’t been much work on the reverse We can guarantee certain good design properties

with respect to generated XML Schema

11 Nov 2004 ER2004, Shanghai, China 11

C-XML Example

44: <xs:element name="Customer" abstract="true"/>45: <xs:element name="PreferredCustomer" substitutionGroup="Customer">46: <xs:complexType>47: <xs:group ref="CustomerDetails"/>48: ...49: </xs:complexType>50: </xs:element>51: <xs:element name="RegularCustomer" substitutionGroup="Customer">52: <xs:complexType>53: <xs:group ref="CustomerDetails"/>54: </xs:complexType>55: </xs:element>

11 Nov 2004 ER2004, Shanghai, China 12

C-XML Example

56: <xs:group name="CustomerDetails">57: <xs:sequence>58: <xs:element name="CustomerName" type="xs:string"/>59: <xs:element name="CustomerAddr" type="xs:string"/>60: ...79: </xs:sequence>80: </xs:group>

11 Nov 2004 ER2004, Shanghai, China 13

C-XML Example

11: <xs:element ... minOccurs="0" maxOccurs="5">

11 Nov 2004 ER2004, Shanghai, China 14

C-XML Example

35: <xs:key name="OrderKey">36: <xs:selector xpath=".//Order"/>37: <xs:field xpath="@OrderID"/>38: </xs:key> ...60: <xs:element name="Order" minOccurs="0" maxOccurs="unbounded">61: <xs:complexType>62: <xs:sequence> ...74: </xs:sequence>75: <xs:attribute name="OrderID" type="xs:positiveInteger" use="required"/> ...77: </xs:complexType>78: </xs:element>

11 Nov 2004 ER2004, Shanghai, China 15

Converting XML Schema back to C-XML We separate structural from non-structural

concepts Structural: elements, attributes, … Non-structural: attribute types, order constraints, …

Algorithm overview: Generate object sets for each element, attribute Connected by relationship sets Nested according to XML hierarchy Re-code all constraints in C-XML

11 Nov 2004 ER2004, Shanghai, China 16

Initial Result of Reverse Conversion

11 Nov 2004 ER2004, Shanghai, China 17

Strikingly Different?

11 Nov 2004 ER2004, Shanghai, China 18

Or Not?Artifact of XML Schema

Artifact of XML nesting

n-ary relationshipdecomposition

11 Nov 2004 ER2004, Shanghai, China 19

Preserving Information and Constraints We formalize C-XML using predicate calculus See the paper for definitions, lemmas,

theorems We claim that our translations between C-

XML and XML Schema preserve information and constraints

11 Nov 2004 ER2004, Shanghai, China 20

View Mechanisms in C-XML

High-level abstractions For model management, reducing cognitive load

C-XML XQuery views Generate XQuery from conceptual description

XQuery integration mappings For bringing together disparate chunks of XML

11 Nov 2004 ER2004, Shanghai, China 21

C-XML XQuery Views

Need to generate XQuery views from C-XML views XQuery can be cumbersome Must follow hierarchical XML layout

C-XQuery borrows syntax from XQuery FLWOR expressions Path expressions are conceptual

“A//B” designates path from A to B regardless of hierarchy or intervening steps

Attribute/element distinction is not necessary Execution is by view unfolding and translation to

standard XQuery

11 Nov 2004 ER2004, Shanghai, China 22

XQuery vs. C-XQueryConsider conceptual path “Item//OrderID”

“OrderID” or “@OrderID”?

11 Nov 2004 ER2004, Shanghai, China 23

Our Contributions A vision for applying conceptual modeling to

the task of enterprise-wide XML support A framework to support the vision:

Information- and constraint-preserving mappings between C-XML and XML Schema

Defined mechanisms for producing and using first-class, high-level, conceptual abstractions

XQuery view definitions over both standard and federated conceptual-model instances

www.deg.byu.edu

11 Nov 2004 ER2004, Shanghai, China 24

C-XQuery Exampledefine view CustomersByItemsOrdered{ for $item in Item

return<Item>

{$item/ItemNr, $item/Description}{ for $customer in $item/Order/Customer

return<Customer>{$customer/CustomerName, $customer/CustomerAddr}{ for $order in $customer/Order,

$item2 in $order/Itemwhere $item2 = $itemreturn<Order>

{$order/OrderDate, $item2/Qty, $item2/SalePrice}</Order>

}</Customer>

}</Item>

}

11 Nov 2004 ER2004, Shanghai, China 25

Views within Viewsdefine view RecentNitrogenFertilizerCustomers{ for $i in CustomersByItemsOrdered

where $i/Description = “Nitrogen Fertilizer”return<Customer>

{ for $c in $i/Customerlet $total := sum( for $o in $c/Order

where $o/OrderDate > add-days(current-date(), -90)return $o/Qty * $o/SalePrice )

return{$c/CustomerName, Total=$total}

}</Customer>

}

for $c in RecentNitrogenFertilizerCustomers/Customerwhere $c/Total > 300return<PotentialThreatCustomer>

{$c/CustomerName, $c/Total}</PotentialThreatCustomer>

11 Nov 2004 ER2004, Shanghai, China 26

C-XQuery Mapping

define view CatalogItemToItem{ for $cItem in CatalogItem

let $itemNr := CatalogNr-to-ItemNr($cItem)let $price := $cItem/MSRP * (1 + $cItem/MarkupPercent)return

<Item><ItemNr>{$itemNr}</ItemNr><Description>{$cItem/ShortName}</Description><Price>{$price}</Price>

</Item>}

11 Nov 2004 ER2004, Shanghai, China 27

C-XML Workflow Diagram