Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

changing from relational schema to XML schema,HELP!

Status
Not open for further replies.

iwsyang

Programmer
Mar 23, 2010
1
NZ
In a relational schema, we have such definition:
create demain( posInt AS int default 1 CHECK(value >1)

create table book( isbn posInt PRIMARY KEy,......)

I convert the domain to this XML schema,
<xsd:simpleType name="posInt">
<xsd:restriction base="xsd:integer">
<xsd:minExclusive value="0" />
</xsd:restriction>
</xsd:simpleType>

and for the table, I try to define "isbn" as an element like:
<xsd:element name="ISDN" type="posInt"/>

But how to express ISDN is a primary key for the table?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top