Docsity

Implementation of Object-Relational Database Systems, Slides of Database Management Systems (DBMS)

Partial preview of the text

Download Implementation of Object-Relational Database Systems and more Slides Database Management Systems (DBMS) in PDF only on Docsity!

ORDB Implementation

Discussion

From RDB to ORDB

Issues to address when

adding OO extensions

to DBMS system

Layout of Data

  • More layout design choices (clustering on disk):
    • Lay out complex object nested and clustered on disk (if nested and not pointer based)
    • Where to store objects that are referenced (shared) by possibly several other and different structures
    • Many design options for objects that are in a type hierarchy with inheritance
    • Constructed types such as arrays require novel methods, like array chunking into (4x4) subarrays for non-continuous access

Why (Object) Identifier?

  • Distinguish objects regardless of content and

location

  • Evolution of object over time
  • Sharing of objects without copying
  • Continuity of identity (persistence)
  • Versions of a single object

OIDs

  • System generated
  • Globally unique
  • Logical identifier (not physical

representation; flexibility in relocation)

  • Remains valid for lifetime of object

(persistent)

OID Support

  • OID generation :
    • uniqueness across time and system
  • Object handling :
    • Operations to test equality/identify
    • Operations to manipulate OIDs for object merging
and copying.
  • Deal with avoiding dangling references

ADTs

  • Type representation : size/storage
  • Type access : import/export
  • Type manipulation : special methods to serve

as filter predicates and join predicates

  • Special-purpose index structures : efficiency

ADTs

  • Mechanism to add index support along with ADT:
    • External storage of index file outside DBMS
    • Provide “access method interface” a la:
      • Open(), close(), search(x), retrieve-next()
      • Plus, statistics on external index
    • Or, generic ‘template’ index structure
      • Generalized Search Tree (GiST) – user-extensible
      • Concurrency/recovery provided

Query Optimization Core

  • New algebra operators must be designed :
    • such as nest, unnest, array-ops, values/objects, etc.
  • Query optimizer must integrate them into
optimization process :
  • New Rewrite rules
  • New Costing
  • New Heuristics

Query Optimization Revisited

  • Existing algebra operators revisited : SELECT
  • Where clause expressions can be expensive
  • So SELECT pushdown may be bad heuristic

Operator Ordering

op

op

Ordering of SELECT Operators

  • Cost factor : now could be dramatic variations
  • Reduction factor: orthogonal to cost factor
  • We want maximal reduction and minimal cost: Rank ( operator ) = (reduction) * ( 1/cost )
  • Order operators by increasing ‘rank’
  • High rank :
    • (good) -> low in cost, and large reduction
  • Low rank
    • (bad) -> high in cost, and small reduction

Registering New Index (to

Optimizer)

  • What WHERE conditions it supports
  • Estimated cost for “matching tuple” (IO/CPU)
    • Given by index designer (user?)
    • Monitor statistics; even construct test plans
  • Estimation of reduction factors/join factors
    • Register auxiliary function to estimate factor
    • Provide simple defaults

Methods

  • Use ADT/methods in query specification
  • Achieves:
    • flexibility
    • extensibility