欢迎来到天天文库
浏览记录
ID:51969299
大小:1.34 MB
页数:36页
时间:2020-03-26
《数据库系统概念全套配套课件PPT ch22.ppt》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、Chapter22:Object-BasedDatabasesChapter22:Object-BasedDatabasesComplexDataTypesandObjectOrientationStructuredDataTypesandInheritanceinSQLTableInheritanceArrayandMultisetTypesinSQLObjectIdentityandReferenceTypesinSQLImplementingO-RFeaturesPersistentProgrammingLanguagesComparisonofObject-Orientedand
2、Object-RelationalDatabasesObject-RelationalDataModelsExtendtherelationaldatamodelbyincludingobjectorientationandconstructstodealwithaddeddatatypes.Allowattributesoftuplestohavecomplextypes,includingnon-atomicvaluessuchasnestedrelations.Preserverelationalfoundations,inparticularthedeclarativeacces
3、stodata,whileextendingmodelingpower.Upwardcompatibilitywithexistingrelationallanguages.ComplexDataTypesMotivation:Permitnon-atomicdomains(atomicindivisible)Exampleofnon-atomicdomain:setofintegers,orsetoftuplesAllowsmoreintuitivemodelingforapplicationswithcomplexdataIntuitivedefinition:allowrelat
4、ionswheneverweallowatomic(scalar)values—relationswithinrelationsRetainsmathematicalfoundationofrelationalmodelViolatesfirstnormalform.ExampleofaNestedRelationExample:libraryinformationsystemEachbookhastitle,alist(array)ofauthors,Publisher,withsubfieldsnameandbranch,andasetofkeywordsNon-1NFrelatio
5、nbooks4NFDecompositionofNestedRelationSupposeforsimplicitythattitleuniquelyidentifiesabookInrealworldISBNisauniqueidentifierDecomposebooksinto4NFusingtheschemas:(title,author,position)(title,keyword)(title,pub-name,pub-branch)4NFdesignrequiresuserstoincludejoinsintheirqueries.ComplexTypesandSQLEx
6、tensionsintroducedinSQL:1999tosupportcomplextypes:CollectionandlargeobjecttypesNestedrelationsareanexampleofcollectiontypesStructuredtypesNestedrecordstructureslikecompositeattributesInheritanceObjectorientationIncludingobjectidentifiersandreferencesNotfullyimplementedinanydatabasesystemcurrently
7、ButsomefeaturesarepresentineachofthemajorcommercialdatabasesystemsReadthemanualofyourdatabasesystemtoseewhatitsupportsStructuredTypesandInheritanceinSQLStructuredtypes(a.k.a.user-definedtypes)canbedeclaredandusedinSQLc
此文档下载收益归作者所有