OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



From: Bullard, Claude L (Len) <clbullar@ingr.com>

>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. -->