Object Database System Part1
Object Database System Part1
System
By
Sudarshan
MCA Sem V
Relational Database (RDBMS)
• Inheritance:
– Advantage of common behavior between data
types.
• Both compressed image and low resolution image, are at
some level, just image. Hence we can inherit some
feature of image.
• Object identity:
– It is important not to store copies of object but
reference or pointer to object (video).
– This gives rise to the need of giving object a
unique object identity, which can be used to refer
or point to them from elsewhere in the data.
Solution 1 - OODBMS
• Good for
– Complex data
– Fixed set of manipulations
– Special purpose applications
• Problems
– No query support
– Application bugs trash persistent data
– Security problem
Solution 2 - ORDBMS
SELECT N.theater->name,N.theater->address,F.title
From Nowshowing N,Films F,Countries C
WHERE N.Film = F.filmno AND
overlaps(C.boundary, radius(N.theater->address, 100)) AND
C.name=‘Andorra’ AND ‘HERBERT The Worm’=F.star[1]
• Operation on row:
– Given an item i whose type is a ROW (n1t1, .
. . ,nntn), the field extraction method allow
us to access an individual field nk using
traditional dot notation i.nk
– If we have a collection of rows, the dot
notation gives a collection as a result.
– If row construtors are nested in type
definition, dots may be nested to access the
fields of nested rows eg. i.nk.ml
– This nested dot notation is also called path
Operation on Structured data
• Operation on array:
– ‘array index’ method allows us to access array
item at a particular offset.
– A postfix square bracket is used.
– An operator (CARDINALITY) returns the number of
element in array.
– We can concatenate elements in the array.
• Lists
– head: returns the first element
– tail: returns the list obtained by removing
the first element
– prepend: takes the element and inserts it as
the first element of the list
– append: appends one list to another
Encapsulation and ADT’s
• Allowing user to define new data type is
a key feature of ORDBMS
– Frames table: image (jpeg_image) //
compressed image
– Countries table: boundary (polygon) //shape
of country.
• DBMS allow user to store and retrieve
object of type jpeg_image just as any
other type like integer, float.
• New defined data types usually need to
have type-specific operations defined by
user.
– One might define operation on image data
type as compress, rotate, shrink, blur.
• The combination of an atomic data type
and associated method is called
Encapsulate