1/41
0/100
您的浏览器不支持进度条
下载所得到的文件列表
"A mind once stretched by new thoughts can never regain its.ppt
文档介绍:
"Amindoncestretchedbynewthoughtscanneverregainitsoriginalshape.”--AlbertEinsteinProvethateachpositiveintegerhasamultiplethatcanbewrittenonlyusing0’sand1’s.Duckinthecenterofalake,Foxatthebanks.Foxmoves4timesasfastastheduck.Cantheduckgettoapointonthebanksbeforethefoxdoes?(Reading)Extendingrelationalalgebraandrelationalcalculuswithset-valuedattributesandaggregatefunctions.G.OZSOYOGLUetal.ACMTransactionsonDatabaseSystems,Vol12,4,1987.566--592.SQL:Queries,Programming,TriggersChapter5ExampleInstancesR1S1S2WewillusetheseinstancesoftheSailorsandReservesrelationsinourexamples.IfthekeyfortheReservesrelationcontainedonlytheattributessidandbid,howwouldthesemanticsdiffer?BasicSQLQueryrelation-listAlistofrelationnames(possiblywitharange-variableaftereachname).target-listAlistofattributesofrelationsinrelation-parisons(AttropconstorAttr1opAttr2,binedusingAND,ORandNOT.DISTINCTisanoptionalkeywordindicatingthattheanswershouldnotcontainduplicates.Defaultisthatduplicatesarenoteliminated!SELECT[DISTINCT]target-listFROMrelation-putethecross-productofrelation-list.Discardresultingtuplesiftheyfailqualifications.Deleteattributesthatarenotintarget-list.IfDISTINCTisspecified,eliminateduplicaterows.puteaquery!putethesameanswers.ExampleofConceptualEvaluationSELECTS.snameFROMSailorsS,ReservesRWHERES.sid=R.sidANDR.bid=103ANoteonRangeVariablesReallyneededonlyifthesamerelationappearstwiceintheFROMclause.Thepreviousquerycanalsobewrittenas:SELECTS.snameFROMSailorsS,ReservesRWHERES.sid=R.sidANDbid=103SELECTsnameFROMSailors,ReservesWHERESailors.sid=Reserves.sidANDbid=103Itisgoodstyle,however,touserangevariablesalways!ORFindsailorswho’vereservedatleastoneboatWouldaddingDISTINCTtothisquerymakeadifference?WhatistheeffectofreplacingS.sidbyS.snameintheSELECTclause?WouldaddingDISTINCTtothisvariantofthequerymakeadifference?SELECTS.sidFROMSailorsS,ReservesRWHERES.sid=R.sidExpressionsandStringsIllustratesuseofarithmeticexpressionsandstringpatternmatching:Findtriples(ofagesofsailorsandtwofieldsdefinedbyexpression 内容来自淘豆网www.taodocs.com转载请标明出处.