xsd:key 和 xsd:unique 的区别 [英] Difference between xsd:key and xsd:unique

查看:36
本文介绍了xsd:key 和 xsd:unique 的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 xsd:unique 和 xsd:key 有什么区别?

What is the difference between using xsd:unique and xsd:key?

推荐答案

我找到了自己的答案:

这一切都与基数有关:

xsd:key 用于 (0..N) 和 (1..1) 多重性.xsd:unique 用于可选的 (0..1) 多重性.这也是 xsd:unique 中的 selected 字段可以为 nill 的原因.

xsd:key is used for (0..N) and (1..1) multiplicity. xsd:unique is used for optional (0..1) multiplicity. This is also the reason why a the selected field in a xsd:unique can be nill.

我的回答来源:http://www.xml.com/lpt/a/987

这篇关于xsd:key 和 xsd:unique 的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆