数据库系统基础教程第十一章答案.docx
- 文档编号:9271136
- 上传时间:2023-02-03
- 格式:DOCX
- 页数:13
- 大小:139.19KB
数据库系统基础教程第十一章答案.docx
《数据库系统基础教程第十一章答案.docx》由会员分享,可在线阅读,更多相关《数据库系统基础教程第十一章答案.docx(13页珍藏版)》请在冰豆网上搜索。
数据库系统基础教程第十一章答案
Section1
Exercise11.1.1
a)
b)
c)
Exercise11.1.2
Exercise11.1.3
Exercise11.1.4
Exercise11.1.5
Inthesemistructuredmodel,nodesrepresentdataelements,i.e.,entitiesratherthanentitysets.IntheUMLmodel,nodesofalltypesrepresentobjectsets,andthedataisnotrepresentedatall.
Section2
Exercise11.2.1
xmlversion="1.0"encoding="utf-8"standalone="yes"?
>
Exercise11.2.2
Title
Year
Length
Genre
GonewiththeWind
1939
231
Drama
StarWars
1977
124
SciFi
Wayne’sWorld
1992
95
Comedy
Figure2.3:
TheRelationMovies
TherelationMoviesinXML:
Exercise11.2.3
AnemptyelementcanberepresentedasaSubElementwhosechildIDvalueisnull(orapredefinedIDthatdoesnotmaptoanyelement).
Exercise11.2.4
DocRoot(docID,rootElementID)
Element(elementID,position)
ElementAttribute(elementID,name,value)
ElementValue(elementID,value)
SubElementOf(parentID,childID)
Section3
Exercise11.3.1
xmlversion="1.0"encoding="utf-8"standalone="yes"?
>
Exercise11.3.2
DOCTYPEBank[
ELEMENTBANK(CUSTOMER*,ACCOUNT*)>
ELEMENTCUSTOMER(NAME,ADDRESS,PHONE,SSNO)>
ATTLISTCUSTOMER
custIdID
ownsIDREFS>
ELEMENTNAME(#PCDATA)>
ELEMENTADDRESS(#PCDATA)>
ELEMENTPHONE(#PCDATA)>
ELEMENTSSNO(#PCDATA)>
ELEMENTACCOUNT(NUMBER,TYPE,BALANCE)>
ATTLISTACCOUNT
acctIdID
ownedByIDREFS>
ELEMENTNUMBER(#PCDATA)>
ELEMENTTYPE(#PCDATA)>
ELEMENTBALANCE(#PCDATA)>
]>
Exercise11.3.3
DOCTYPESport[
ELEMENTSPORT(TEAM*,FAN*)>
ELEMENTTEAM(NAME,PLAYER+,COLOR+)>
ATTLISTTEAM
captainIDREF#REQUIRED
teamIDID#REQUIRED>
ELEMENTPLAYER(NAME)>
playerIDID#REQUIRED> ELEMENTFAN(NAME,COLOR*)> favoriteTeamsIDREFS favoritePlayersIDREFS> ELEMENTCOLOR(#PCDATA)> ELEMENTNAME(#PCDATA)> ]> Exercise11.3.4 DOCTYPEGenealogy[ ELEMENTGENEALOGY(PERSON*)> ELEMENTPERSONEMPTY> nameCDATA#REQUIRED personIDID#REQUIRED motherIDIDREF fatherIDIDREF childrenIDIDREFS> ]> Exercise11.3.5 Relationschema: RELATIONNAME(attributelist) DOCTYPERELATIONNAME[ ELEMENTRELATIONNAME(ROW*)> ELEMENTROW(attributelist)> foreachattributeTintheattributelist ELEMENTT(#PCDATA)> ] note: thesingularformoftherelationnameshouldusedinplaceofROW Section4 Exercise11.4.1 --notaninteger--> Exercise11.4.2 xmlversion="1.0"encoding="UTF-8"? > schemaxmlns: xs="http: //www.w3.org/2001/XMLSchema"> complexTypename="Movies"> sequence> elementname="Movie"minOccurs="0"maxOccurs="unbounded"> complexType> sequence> elementname="Title"type="xs: string"/> elementname="Year"type="xs: integer"/> sequence> complexType> element> sequence> complexType> schema> Exercise11.4.3 DOCTYPEMOVIES[ ELEMENTTitle(#PCDATA)> ELEMENTYear(#PCDATA)> ELEMENTGenre(#PCDATA)> ELEMENTMovies(Movie*)> ELEMENTMovie(Title,Year,Genre? )> ]> DOCTYPESTARS[ ELEMENTStars(Star+)> ELEMENTStar(Name,Address,StarredIn*)> ELEMENTName(#PCDATA)> ELEMENTAddress(#PCDATA)> ELEMENTStarredInEMPTY> ATTLISTStarredIn titleCDATA#IMPLIED yearCDATA#IMPLIED> ]> Note: DTDisnotasgranularasXMLschema;somerestrictionsinXMLschemacannotbeenforcedinDTDwithoutmodifyingthestructuresoftheXMLitdefines.
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 数据库 系统 基础教程 第十一 答案