77范文网 - 专业文章范例文档资料分享平台

Data Mining and Semantic Web services(4)

来源:网络收集 时间:2021-09-24 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

context Country

inv: self.partOfPersonCode.size()=2context Employee

inv: self.age=Date::now - self.birthday

Employee

firstName : StringlastName : String

address[0..1] : AddresscountryCode{R1} : String

personalCode{I1}{EU1} : StringpassportNo[0..1]{D1} : String

socialSecurityNo[0..1]{D1} : Stringsex : Sex

birthday : Date/age : Integer

<<enumeration>>

Sex

MF

<<DataType>>

AddressStreet : StringCity : StringZipCode : String

Figure 4. Example of notation of integrity constraints on attributes in UML class diagram

Every object must have one primary identifier, for alternative identification identifier constraint is used. The object may have several identifiers; each of them may consist of several identifying attributes, and identifying attribute may be part of more than one identifier. In UML class diagram the tagged value {In} is used for every identifying attribute (group of attri-butes) to denote an identifier. For example class Emp-loyee besides primary identifier has and identifying attribute personalCode (Figure 4). For alternative identifier constraint, OCL expression is the same as for primary identifier because these constraints have the same meaning but different purpose.

Referential constraint on attribute (group of attri-butes) identifies that attribute is the identifier of one or more associated objects 0, 0. 0 suggested using the tag for the referential attribute constraint with {Rn}, where Rn is the name of the corresponding

association. For example, the attribute Employ-ee.countryCode refers to the primary identifier of Country through the association named R1 (Figure 4). OCL expression for referential constraint of object type A that has mandatory relationship with object type B (and referential attribute c1 referencing to primary identifier of B – d1):

context A

inv: self.B Æ exists(b:B|b.A=self and self.c1=b.d1 and b.d1.oclIsKindOf (PrimaryIdentifier))

Mandatory constraint on attribute is used to indi-cate that attribute must have value 0, 0, 0. In UML all class attributes are mandatory by default. Appending [0..1] after attribute name means that attribute is optional 0. In Figure 4, class Employee has optional attributes: passportNo, socialSecurityNo and Address, the rest attributes are mandatory. Mandatory constraint

Abstract. Integrity constraints are incident part of conceptual models, including part of semantics of problem domain. Analysis of the most important methods of conceptual modelling has revealed that none of them analyze the complete set of integrity const

Representation of Integrity Constraints in Conceptual Models

on attribute can be expressed graphically therefore we don’t need OCL expressions.

Disjunctive mandatory constraint indicates that disjunction of class attributes is mandatory. It means that in all allowable states of information system at least one of class attributes constrained by disjunctive mandatory constraint must have value 0, 0, 0. UML does not have graphical notation for disjunctive mandatory constraint so this kind of constraint needs to be expressed textually in an attached note 0, 0 or in OCL. OCL expression for disjunctive mandatory constraint on attributes a1,…,ai,…,an of object type A:

context A

inv:not(self.a1 isUndefined()) … or not(self.ai isUndefined()… or not(self.an isUndefined())

Employee. In general case, external uniqueness constraint on attribute c1 of object A and attribute c2 of related object B:

context A

inv: self Æ exists (a1,a2:A|

a1.B.c1=a2.B.c1 and a1.c2=a2.c2 and c1=c2 and c1.oclIsKindOf

(ExternalUniqueness) implies a1=a2)

In order to capture this constraint graphically we need to extend UML notation adding tagged value like {Dn} where in the case of class having several attri-bute groups constrained with disjunctive mandatory constraint, index n indicates the number of attribute group constrained by this type of constraint. For example, in Figure 4 class Employee has one attribute group {passportNo and socialSecurityNo} constrained by disjunctive mandatory constraint (the number equal to one may be omitted).

Internal uniqueness constraint indicates that the value of one or more attributes of any two instances of class is different from the set of all other instances of that class 0, 0, 0. UML does not have special graphical notation for uniqueness constraint. Hainaut 0 suggested to bold unique attributes, but such solution is not appropriate for unique attribute groups, because one class could have several groups. Halpin 0 has introduced {Un} notation to append as textual constraints to the constrained attributes. The index indicates a group of attributes having unique values for all instances of class. Figure 4 illustrates example of unique attribute for class Country. OCL expression for uniqueness constraint on attributes c1,…,cn of object type A:

context A

inv: self Æ exists

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说医药卫生Data Mining and Semantic Web services(4)在线全文阅读。

Data Mining and Semantic Web services(4).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/yiyao/1250662.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: