欢迎来到天天文库
浏览记录
ID:51622836
大小:3.66 MB
页数:61页
时间:2020-03-26
《数据库系统概念全套配套课件PPT appC.ppt》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、AppendixC:OtherRelationalLanguagesAppendixC:OtherRelationalLanguagesQuery-by-Example(QBE)AccessDatalogQuery-by-Example(QBE)BasicStructureQueriesonOneRelationQueriesonSeveralRelationsTheConditionBoxTheResultRelationOrderingtheDisplayofTuplesAggregateOperationsModificationoftheDatabaseQBE—BasicStructu
2、reAgraphicalquerylanguagewhichisbased(roughly)onthedomainrelationalcalculusTwodimensionalsyntax–systemcreatestemplatesofrelationsthatarerequestedbyusersQueriesareexpressed“byexample”QBESkeletonTablesfortheBankExampleQBESkeletonTables(Cont.)QueriesonOneRelationFindallloannumbersatthePerryridgebranch.
3、_xisavariable(optional;canbeomittedinabovequery)P.meansprint(display)duplicatesareremovedbydefaultToretainduplicatesuseP.ALLP._xQueriesonOneRelation(Cont.)DisplayfulldetailsofallloansP._xP._yP._zMethod1:Method2:ShorthandnotationQueriesonOneRelation(Cont.)FindnamesofallbranchesthatarenotlocatedinBroo
4、klynFindtheloannumberofallloanswithaloanamountofmorethan$700QueriesonOneRelation(Cont.)FindtheloannumbersofallloansmadejointlytoSmithandJones.FindallcustomerswholiveinthesamecityasJones.QueriesonSeveralRelationsFindthenamesofallcustomerswhohavealoanfromthePerryridgebranch.QueriesonSeveralRelations(C
5、ont.)Findthenamesofallcustomerswhohavebothanaccountandaloanatthebank.NegationinQBEFindthenamesofallcustomerswhohaveanaccountatthebank,butdonothavealoanfromthebank.¬means“theredoesnotexist”NegationinQBE(Cont.)Findallcustomerswhohaveatleasttwoaccounts.¬means“notequalto”TheConditionBoxAllowstheexpressi
6、onofconstraintsondomainvariablesthatareeitherinconvenientorimpossibletoexpresswithintheskeletontables.ComplexconditionscanbeusedinconditionboxesExample:FindtheloannumbersofallloansmadetoSmith,toJones,ortobothjointlyConditionBox(Cont.)QBEsupportsaninterestingsyntaxforexpressingalternativevalues.Condi
7、tionBox(Cont.)Findallaccountnumberswithabalancegreaterthan$1,300andlessthan$1,500.Findallaccountnumberswithabalancegreaterthan$1,300andlessthan$2,000butnotexactly$1,500.ConditionBox(Cont.)Findallbranc
此文档下载收益归作者所有