Object-relational database systemsContentIntroductionTaxonomy of DBMS ApplicationSimple dataOODBMSORDBMSFeaturesInclusion of New Types in Relational Database SystemsExampleExample (cont’d)Operators for BoxesMotivationConditionsDefinition of New TypesDefinition of New OperatorsSafety loopholeNew access methodsExample: B-treeInformation on the data types of operators (B-tree)New set of operators (B-tree)Implementing New Access MethodsHard problem- work with transaction managementAccess path selectionGenerate query processing planSummaryThe POSTGRES Next-Generation Database Management SystemThree kinds of services for DBMSExample- newspaper layoutPOSTGRES Data Model-Design criteriaDesign criteriaSlide 32Data Model - ClassData model - InheritanceThree kinds of classesVersion ExampleData model - TypesComposite typesData Model - FunctionsFunctionsPOSTQUELThe Rules SystemSyntax of rulesForward and Backward chainingImplementation of RulesWhen rules are activatedStorage SystemPerformanceButCommentsPREDATOR DESIGN AND INPLEMENTATIONSystem overviewServer ArchitectureEnhanced Data TypesImprovementE-ADTThank YouObject-relational database systemsYong YaoCS632April 17, 2001ContentIntroductionMichael Stonebraker: Inclusion of New Types in Relational Data Base Systems. Michael Stonebraker, Greg Kemnitz: The Postgres Next Generation Database Management System.PREDATOR System Design Document: A detailed description of internal design decisions and implementation details.IntroductionThe relational modelDominant mainstream approachWork well on business data processingBut things have changed drastically, nontraditional problems.Taxonomy of DBMS ApplicationYesNoUse SQL data Simple ComplexcomplexitySimple data YesNoUse SQL data Simple Complexcomplexity Relational DBMSFile SystemOODBMSYesNoUse SQL data Simple Complexcomplexity Relational DBMSFile SystemOODBMS•A programming language with a type system•Persistent objectORDBMSYesNoUse SQL data Simple Complexcomplexity Relational DBMSORDBMSFile SystemOODBMSFeatures Base type extensionInheritanceComplex objectInclusion of New Types in Relational Database SystemsMichael StonebrakerEECS Dept.University of California, BerkeleyExampleRepresent a set of boxes in the DBMS and a simple query- find all the boxes that overlap the unit square(0,1,0,1).RDBMS:Create box(id=i4, x1=f8, x2=f8,y1=f8,y2=f8)select * from boxwhere ! (box.x2<=0 or box.x1>=1 or box,y2<=0 or box.y1>=1)Too hard to understandToo complex to optimize Too many clauses to checkExample (cont’d)Create box(id=i4,desc=box)select *from boxwhere box.desc!!”0,1,0,1”Box: new data type“!!”: overlap operator with two operands of data type box, return a booleanOperators for BoxesMotivation Needs of business data processing applicationsGeographic Information SystemNew Types: Point, Line, Polygon;New operators: distance, intersection ;New access methods: R-trees, KDB trees;Conditions 1. The definition of user-defined data types2. The definition of new operators for these data types3. The implementation of new access methods for data types4. Optimized query processing for commands containing new data types and operatorsDefinition of New TypesFollow a registration processdefine type-name length = value, input = file-name, output = file-nameOccupy a fixed amount of spaceConversion routinesDefinition of New OperatorsSafety loopholeProblem: an ADT routine which has an error can overwrite DBMS data structuresUnclear whether such errors are due to bugs in the user routines or in the DBMSSolutions:Run in separate address spaceBuild a language processorProvide two environmentsNew access methodsUsers can add new access methods to support user-defined data typesGoal: extensibilityInterface:Conditions for the operatorsInformation on the data types of operators Define set of operatorsExample: B-treeConditions for operators:Information on the data types of operators (B-tree)•“<=“ is required•Type: specific type, fixed, variable, fix-var, type1, type2New set of operators (B-tree) F1=(value - low-key) / (high-key – low-key)F2=(high-key – value) / (high-key – low-key)Implementing New Access MethodsA collection of procedure callsopen (relation-name)close (descriptor)get-next(descriptor, OPR, value, tuple-id)insert (descriptor,tuple)delete(descriptor, tuple-id)replace(descriptor, tuple-id, new-tuple)build(descriptor,keyname,OPR)Hard problem- work with transaction managementlog pages – simple, but may suffer from performance penaltylog events Event-oriented interfaceREDO(T)UNDO(T)LOG(event-type, event-data)Access path selectionFour pieces of information for optimizationStups: estimate the expected number of records…where rel-name.field-name OPR valueA second selectivity factor S: …where relname-1.field-1 OPR relname-2.field-2Feasibility of merge-sortFeasibility of hash-joinDefine operator token= AE, …… Stups=1 S= min(N1.N2). merge-sort with AL, hash-joinGenerate query processing planrelname-1.field-1 OPR relname-2.field-2Merge sortIterative substitutionHash JoinRelname.field-name OPR valueany access method with field-name as a keySecondary indexSequential searchSummaryHow to extend an abstract data typeHow to define new access methodIntegrate new access method with transaction managementGeneration of optimized query processing planThe POSTGRES Next-GenerationDatabase Management SystemMichael StonebrakerGreg KemnitzThree kinds of services for DBMSTraditional data managementSimple data typeObject managementComplex data types, e.g. bitmaps, icons, text…Knowledge managementStore and enforce a collection of rulesExample- newspaper layoutstore and manipulate text and graphics, Bill customers for advertisement.Data: customer informationObject: text, pictures and iconsRules: control newspaper layoutPOSTGRES Data Model-Design criteriaTraditional relational DBMSs data model: a collection of named relationsOrientation toward database access from a query languageInteract with database by query language-POSTQUELUser defined functionsDesign criteriaOrientation toward multilingual accessTwo selectionsOne language tightly coupled to the systemMultilingualPOSTGRES is programming
View Full Document