TransformationRule(逻辑实现成关系表的规则)
来源:互联网 发布:机加工工艺软件 编辑:程序博客网 时间:2024/06/09 23:03
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
wordunderlinedisprimarykey
Rule1.EachentityinanE-Rdiagramismappedtoasingletableinarelationaldatabase;thetableisnameaftertheentity.Thecolumnsofthetablerepresentallthesingle-valuedsimpleattributesthatareattachedtotheentity(possiblythroughacompositeattribute,althoughacompositeattributeitsselfdoesnotbecomeacolumnofthetable)。
Rule2:GivenanentityEwithprimaryidentifierp,amulti-valuedattributeaattachedtoEinanE-Rdiagramismappedtoatableofitsown;thetableisnamedafterthepluralmulti-valuedattribute.Thecolumnsofthisnewtablearenamedafterpanda,androwsofthetablecorrespondto(p,a)valuepairs,representingallpairingsofattributevaluesofaassociatedwithentityoccurrencesinE.Theprimarykeyattributeforthistableisthesetofcolumnsinpanda.
EG:(herep==eid,a==hobby)
employes(eid,staddress,city,states,zipcodes)(197,7Beacon,Boston,MA,02102)(221,19BrightonSt,Boston,MA,02103)
hobbies(eid,hobby)(197,chess)(197,painting)(221,reading)
Rules3:N-NRelationships.WhentwoentitiesEandFtakepartinamany-to-manybinaryrelationshipR,therelationshipismappedtoarepresentativetableTintherelatedrelationaldatabasedesign.ThetablecontainscolumnsforallarrtibutesintheprimarykeysofbothtablestransformedfromentitiesEandF,andthissetofcolumnsformstheprimarykeyforthetableT.
EG:(Employees-(1,N)-works_on-(0,N)-Projects ---N-N(many-to-many) )
employees(eid,straddr,city,state,zipcode) --woks_on(eid,prid,percent)--projects(prid,proj_name,due_date)
Rules4:N-1Relationships.WhentwoentitiesEandFtakepartinamany-to-onebinaryrelationshipR,therlationshipwillnotbemappedtoatableofitsowninarelationaldatabasedesign.Instead,ifweassumethattheentityFhasmax-card(F,R)=1andthusrepresentsthe“many“sideoftherelationship,therelationaltableTtransformedfromtheentityFshouldincludecolumsconstituting theprimarykeyforthetabletransformedfromtheentityE;thisisknownasaforeignkeyinT.
EG:instructors(insid,lname,office_no,ext) --cours_sections(secid,insid,course,room,preriod).
Rules5:1-1Relationships,optionalParticipation.GiventwoentitiesEandFthattakepartinaone-to-onebinaryrelationshipR,whereparticipationisoptionaloneitherside,wewishtotranslatethissituationintoarelaionaldesign --Useforeignkeyoneitherorbothsides.
Rules6:1-1Relationships,MandatoryParticipationonBothSides.Inthecaseofaone-to-onerelationshipwithmandatoryparticpationonbothsides,itis mostappropriateto combinethetablesforthetwoentitiesintoone,andinthiswayavoidanyforeignkeys.
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
wordunderlinedisprimarykey
Rule1.EachentityinanE-Rdiagramismappedtoasingletableinarelationaldatabase;thetableisnameaftertheentity.Thecolumnsofthetablerepresentallthesingle-valuedsimpleattributesthatareattachedtotheentity(possiblythroughacompositeattribute,althoughacompositeattributeitsselfdoesnotbecomeacolumnofthetable)。
Rule2:GivenanentityEwithprimaryidentifierp,amulti-valuedattributeaattachedtoEinanE-Rdiagramismappedtoatableofitsown;thetableisnamedafterthepluralmulti-valuedattribute.Thecolumnsofthisnewtablearenamedafterpanda,androwsofthetablecorrespondto(p,a)valuepairs,representingallpairingsofattributevaluesofaassociatedwithentityoccurrencesinE.Theprimarykeyattributeforthistableisthesetofcolumnsinpanda.
EG:(herep==eid,a==hobby)
employes(eid,staddress,city,states,zipcodes)(197,7Beacon,Boston,MA,02102)(221,19BrightonSt,Boston,MA,02103)
hobbies(eid,hobby)(197,chess)(197,painting)(221,reading)
Rules3:N-NRelationships.WhentwoentitiesEandFtakepartinamany-to-manybinaryrelationshipR,therelationshipismappedtoarepresentativetableTintherelatedrelationaldatabasedesign.ThetablecontainscolumnsforallarrtibutesintheprimarykeysofbothtablestransformedfromentitiesEandF,andthissetofcolumnsformstheprimarykeyforthetableT.
EG:(Employees-(1,N)-works_on-(0,N)-Projects ---N-N(many-to-many) )
employees(eid,straddr,city,state,zipcode) --woks_on(eid,prid,percent)--projects(prid,proj_name,due_date)
Rules4:N-1Relationships.WhentwoentitiesEandFtakepartinamany-to-onebinaryrelationshipR,therlationshipwillnotbemappedtoatableofitsowninarelationaldatabasedesign.Instead,ifweassumethattheentityFhasmax-card(F,R)=1andthusrepresentsthe“many“sideoftherelationship,therelationaltableTtransformedfromtheentityFshouldincludecolumsconstituting theprimarykeyforthetabletransformedfromtheentityE;thisisknownasaforeignkeyinT.
EG:instructors(insid,lname,office_no,ext) --cours_sections(secid,insid,course,room,preriod).
Rules5:1-1Relationships,optionalParticipation.GiventwoentitiesEandFthattakepartinaone-to-onebinaryrelationshipR,whereparticipationisoptionaloneitherside,wewishtotranslatethissituationintoarelaionaldesign --Useforeignkeyoneitherorbothsides.
Rules6:1-1Relationships,MandatoryParticipationonBothSides.Inthecaseofaone-to-onerelationshipwithmandatoryparticpationonbothsides,itis mostappropriateto combinethetablesforthetwoentitiesintoone,andinthiswayavoidanyforeignkeys.
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- TransformationRule(逻辑实现成关系表的规则)
- python 的逻辑关系
- uml类图中得集中重要的逻辑关系和实现
- iptables规则的关系
- 领域逻辑与业务逻辑的关系
- 使用 Drools 规则引擎实现业务逻辑
- 使用 Drools 规则引擎实现业务逻辑
- 使用 Drools 规则引擎实现业务逻辑
- 使用 Drools 规则引擎实现业务逻辑
- 使用 Drools 规则引擎实现业务逻辑
- 使用 Drools 规则引擎实现业务逻辑
- 使用 Drools 规则引擎实现业务逻辑
- 使用 Drools 规则引擎实现业务逻辑
- 使用 Drools 规则引擎实现业务逻辑
- 使用 Drools 规则引擎实现业务逻辑
- 使用 Drools 规则引擎实现业务逻辑
- 使用 Drools 规则引擎实现业务逻辑
- 使用 Drools 规则引擎实现业务逻辑
- 如何只用HTML画出一个圆角的Table表格?
- 2000文件组织形式
- 使用Opatch工具应用过渡性Patch
- 如何学习J2EE
- 帮忙看一看代码,很迷惘,望不吝赐教。
- TransformationRule(逻辑实现成关系表的规则)
- 程序语言流行度最新排行榜
- 指南(转)
- 完整迁移
- Winpcap(二)
- 用于执行(计算)字符串表达式的T-SQL存储过程
- 收藏几段SQLServer语句和存储过程
- 是考研,还是工作
- trigger的制作