[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

ER schema language (was Re: Request for a poll: (was RE: Datatypes vsana

  • From: Rick Jelliffe <ricko@a...>
  • To: xml-dev <xml-dev@l...>
  • Date: Fri, 16 Mar 2001 01:08:15 +0800

er schema
From: Bullard, Claude L (Len) <clbullar@i...>

>So what you are suggesting looks right,

Probably I should be a bit more concrete.  I attach a little draft of a spec
for an ER schema language, showing the kind of thing I would be thinking of.
(The thing missing is the construction of built-in valueSets to act as
datatypes.) Just a rough sketch.

Cheers
Rick Jelliffe
Title: ER Schema Mapping

ER Schema Mapping

Rick Jelliffe, Topologi, 2001/03/17

This is a schema language using the entity-relationship model.

The basic idea is that every arc or node in the ER model has an attribute to specify which kind of markup should be used to represent that arc or node. Then there is a "stub" section, which contains an exemplar stub (in some other namespace) to allow the topmost element to be set: I am assuming that the topmost elements are housekeeping containers. The elements in the stub can have various attributes from the er: namespace specified, which are the connection points for the data. From then on, the markup attributes on the model take over.

 
<!ENTITY % binding " child | parent | attribute | previousSibling | nextSibling | IDREF | key " >

<!ENTITY % attributeForm " er:attributeRef IDREF #REQUIRED " >	
<!ENTITY % entityForm " er:entityRef IDREF #REQUIRED " >	
<!ENTITY % entityRefForm " er:entityRefRef IDREF #REQUIRED " >			
<!ENTITY % relationshipForm " er:relationshipRef IDREF #REQUIRED " >
<!ENTITY % valueForm " er:valueRef IDREF #REQUIRED " >
<!ENTITY % entitySetForm " er:entitySetRef IDREF #REQUIRED " >		
<!ENTITY % relationshipSetForm " er:relationshipSetRef IDREF #REQUIRED " >
<!ENTITY % valueSetForm " er:valueSetRef IDREF #REQUIRED " >

<!ELEMENT schema
      ( conceptualModel, stub )>
<!ATTLIST schema
     xmlns CDATA "http://www.ascc.net/xml/er"
     xmlns:er CDATA "http://www.ascc.net/xml/er"  >


<!ELEMENT conceptualModel
	( entity*, entitySet*, relationshipSet*,  valueSet*)>

<!ELEMENT attribute EMPTY>
<!ELEMENT entity (attribute*)>
<!ELEMENT entitySet (entitySetMember*)>
<!ELEMENT entitySetMember EMPTY>
<!ELEMENT relationship (attribute*, entityRef+)>
<!ELEMENT relationshipSet (relationship*)>
<!ELEMENT entityRef EMPTY >
<!ELEMENT value (#PCDATA)>
<!ELEMENT valueSet (value*)>
<!ELEMENT stub ANY >

<!ATTLIST attribute
       markup  ( %binding; ) "child"
       name  NMTOKEN #IMPLIED
	xlink:type CDATA #FIXED "simple"
	xlink:href CDATA #REQUIRED
	xlink:role CDATA #REQUIRED>
	<!-- an attribute links to a value in a valueSet -->
<!ATTLIST entity
	id ID #REQUIRED
	name CDATA #IMPLIED>
<!ATTLIST entitySet
       markup  ( element | none ) "none"
       name  NMTOKEN #IMPLIED
	id ID #IMPLIED
	name CDATA #IMPLIED
	xlink:type CDATA #FIXED "extended">
<!ATTLIST entitySetMember
       markup  ( %binding; ) "child"
       name  NMTOKEN #IMPLIED
      xlink:href CDATA  #REQUIRED
      xlink:type CDATA #FIXED "locator">
	<!-- an entitySetMember links to an entity  -->
<!ATTLIST relationship 	
       markup  ( %binding; ) "child"
       name  NMTOKEN #IMPLIED
	id ID #REQUIRED
	name CDATA #IMPLIED
	xlink:type CDATA #FIXED "extended" >
<!ATTLIST relationshipSet
       markup  ( element | none ) "none"
       name  NMTOKEN #IMPLIED
	id ID #IMPLIED
	name CDATA #IMPLIED >
<!ATTLIST entityRef
       markup  ( %binding; ) "child"
       name  NMTOKEN #IMPLIED
      xlink:href CDATA  #REQUIRED
      xlink:type CDATA #FIXED "locator"
      xlink:role CDATA #IMPLIED> 
      <!-- an entityRef links to an entity set --> 
	<!-- if not role attribute is provide, the entity's order is considered significant 
(i.e. to be preserved for consistant referencing) -->
<!ATTLIST value
       markup  ( %binding; ) "child"
       name  NMTOKEN #IMPLIED
	ID ID  #REQUIRED
	xsi:type CDATA #IMPLIED>
<!ATTLIST valueSet 
       markup  ( element | none ) "none"
       name  NMTOKEN #IMPLIED
	id ID #REQUIRED
	name CDATA #IMPLIED
 	predicate CDATA  #REQUIRED>
<!-- The predicate is a link to the XML Schemas datatype name or notation, and
      all values in the value set correspond to that type, with the xsi:type perhaps
	being some restriction of it. -->
	
		

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.