Exact and approximate aggregation in constraint qu

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

ExactandApproximateAggregationinConstraintQueryLanguagesMichaelBenediktBellLaboratories263ShumanBlvdNaperville,IL60566E-mail:benedikt@research.bell-labs.comLeonidLibkinBellLaboratories600MountainAvenueMurrayHill,NJ07974E-mail:libkin@bell-labs.comAbstractWeinvestigatetheproblemofhowtoextendconstraintquerylanguageswithaggregateoper-ators.Wedealwithstandardrelationalaggregation,andalsowithaggregatesspecictospatialdata,suchasvolume.Westudyseveralapproaches,includingtheadditionofanewclassofap-proximateaggregateoperatorswhichallowanerrortoleranceinthecomputation.WeshowhowtechniquesbasedonVC-dimensioncanbeusedtogivelanguageswithapproximationoperators,butalsoshowthattheselanguageshaveanumberofshortcomings.Wethengiveasetofresultsshowingthatitisimpossibletogetconstraint-basedlanguagesthatadmitdenableaggregationoperators,bothforexactoperatorsandforapproximateones.Theseresultsarequiterobust,inthattheyshowthatclosureunderaggregationisproblematicevenwhentheclassoffunctionspermittedinconstraintsisexpanded.Thismotivatesadierentapproachtotheaggregationproblem.WeintroducealanguageFO+Poly+Sum,whichpermitsstandarddiscreteaggregationoperatorstobeappliedtotheoutputsofrange-restrictedconstraintqueries.Weshowthatthislanguagehasanumberofattractiveclosureandexpressivityproperties,andthatitcancomputevolumesoflinear-constraintdatabases.1IntroductionNewapplicationsofdatabasetechnology,suchasGeographicalInformationSystems,havespurredaconsiderableamountofresearchintogeneralizationsofthestandardrelationalmodeltodealwiththemanipulationofgeometricorspatialdata.Onecommonapproachtomodelingspatialdatabaseistoconsiderinputdatabasesasgivenbyasetofwell-behavedrelationsineuclideanspace{forexample,byasetofsemi-linearorsemi-algebraicsets.Thereareanumberofproposedquerylanguagesthatextendclassicalrelationalalgebratothissetting,languagesthatallowtheuseofvariousgeometricoperationsinmanipulatingspatialdatabases.Oneofthemostwell-developedmodelsforspatialqueriesistheconstraintdatabasemodel[23].Inthismodel,spatialdatabasesarerepresentedassetsoflinearorpolynomialconstraints.Databasesarequeriedusingstandardrelationalcalculuswithlinear(resp.polynomial)inequalitiesasselectioncriteria,see[4,5,6,19,20,32,38].Theselanguages,denotedbyFO+LinandFO+Poly,havebecomethedominantonesintheconstraintdatabaseliterature.Theyhaveaveryimportantclosureproperty:theapplicationofaFO+Linquerytoalinearconstraintsetyieldsanewsetoflinearconstraints;similarlyFO+Polyqueriesonsetsdenablewithpolynomialconstraintsproducesetsthatcanstillbedenedwithpolynomialconstraints.1ConstraintQueryLanguages,then,giveanaturalanalogofrelationalcalculusinthegeometriccontext.Acrucialquestion,though,concernshowtoextendstandardaggregationconstructsfromtherelationalmodeltothegeometricsetting.Thisquestionhastwocomponents.First,wewouldlikeourlanguagestobeabletoapplystandardSQLoperatorssuchasTOTALandAVGtospatialqueries,whenevertheseoperatorsmakesense.Sincetheoutputofqueriesinconstraintquerylanguages(andinotherspatialquerylanguages)maybemerelynitelyrepresentable(thatis,representablebysomenitemeans,e.g.,anitesetofconstraints)andnotnite,theaggregationoperatorscannotbeallowedtobeappliedtoanyconstraintqueryoutput.Oneproblemthen,istodesignalanguagethatallowsthesafeapplicationofclassicalaggregates.Thesecondcomponentofthe‘aggregationquestion’concernsaggregationnotionsthatarespecictothespatialdatabases.Mostcommonly,givenadatabaseandtheoutputofaqueryoverit,onewishestoformnewqueriesaboutthevolumeofthisoutput.OnemayalsoextendstandardaggregatessuchasAVG,andaskfortheaveragevalueofapolynomialoveraspatialobject.SuchaggregatesarisebothfrompracticalconcernsofGIS,andalsoasthenaturalcontinuousanalogsofclassicalaggregationqueries.Thus,wewouldliketoextendconstraintquerylanguagestoincorporatetheabilitytocalculatevolumesandotheraggregatesarisinginthespatialsetting.Inattemptingtoaddaggregationtoconstraintquerylanguages,oneimmediatelyencounterssomedauntingobstacles.Whilestandardconstraintdatabasesareclosedunderrst-orderoperationssuchasjoinandprojection,theyareclearlynotclosedundertakingofvolumes.Thisfactiswell-knownintheliterature[23,27,12],andstemsfromthefactthatneitherthesemi-linearnorsemi-algebraicsetsareclosedunderintegrals.Totakeanexamplefromthesemi-algebraicsetting,aqueryaskingforthevolumeofinitialslicesoftheepigraphof1=xoutputsthegraphofthelnfunction,whileiteratingvolumequeriesinthisfashionwouldgiveasoutputtranscendentalfunctionsthatarenotevenexpressibleusingeldoperations,logarithmsandexponents.Thus,onecannothopetoaddageneralvolumeoperatortoexistingrst-orderconstraintquerylanguagessuchasFO+Polyandgetaclosedlanguagewhilestillremainingwithinthedomainofpolynomialconstraintdatabases.Thereareseveralapproachestothevolumeproblemmentionedabove.First,onecouldweakentherequirementthatvolumesbecomputedexactlyandinsteadaimonlytocomputeapproximatevolumes.Thusaquerymighthaveatoleranceassociatedwitheachinstanceofavolumeoperator,withoutputrequiredonlytobecorrectwithinthegiventolerance.Thereareanumberofpracticalandtheoreticalmotivationsfo

1 / 24
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功