Lecture 9 on Object Oriented Database

glintplainvilleSoftware and s/w Development

Nov 18, 2013 (3 years and 9 months ago)

84 views

Lecture
9

on Object Oriented Database


An object
-
oriented database consists of class as schema, object as data, and each
object has OID as an unique identifier, and data operation as encapsulation. A subclass
and a superclass object is physically one objec
t but in different view such that a
subclass inherits the data and operation of a superclass. Object associated with each
other through Stored OID in bi
-
direction references, that is, association and inverse
association. A Stored OID is a reference by use
of OID which is generated by the
system. Polymorphism means overloading in object
-
oriented database such that the
same function can produce different output depending on the values of online input
parameters.


In mapping relational schema into an object
-
or
iented schema, each relation is mapped
into a class, and each foreign key is mapped into an association attribute which is the
data structure of Stored OID. Each superclass and subclass relations are also mapped
into superclass and subclass in object
-
orien
ted database with subclass inheriting data
and operation of superclass.


Extended relational database is an Object
-
relational database(ORDB). Fixed data type
is not flexible in relational database(RDB).


Objected
-
Oriented database(OODB) allows user define

data types. Object
-
Oriented
programming is the programming in object
-
oriented functions but not necessary using
OODB.


A method is an application program with a set of operations accessing a class inside
object
-
oriented database. In other words, a method
describes object operations limited
to a class only.


An object
-
oriented schema defines an object class definition including { Name }















{Attribute}
















{Method}


An complex data type is an object inside another object. A primitive da
ta type is a
data type that cannot be decomposed further.


An OID is an object identity which is system generated with a unique address. A
Stored OID is an OID stored in another object used as a pointer for reference.


Inheritance means the reuse (inherit)

of superclass data and operations in subclass.
The benefit is to eliminate data redundancy in data storage, and providing different
logical view of superclass and subclass of the same object. Same object appears in
superclass view and subclass view, but s
tored as ONE object inside OODB.


A class is a set of objects grouped together to form a class which is the data structure
of OODB schema. An object is an object data including object title, attribute and
method.


A superclass is a class that includes subc
lass(es). A subclass is a class that is inside a
superclass and can inherit data, and method of the superclass.


An object refers to each other in bi
-
directional pointers (pointers and inverse pointers).
An object can refer to itself in recursive pointer.


A data model is an DDL plus an DML of a database. A database system is a database
storage plus database basic functions of transaction process, recovery, concurrency
control and security etc.


A classification is a schema class. An instantiation is a data

instance of a class. An
Association Attribute is an attribute with a stored OID referring to another object.


A Set in an Association Attribute data type means referring to a set of multiple
occurrences of other objects by using a set of stored OID in one
-
to
-
many association
between two objects.


A Set value is a set of multiple values, which is a valid data type in OODB.


Polymorphism is an overloading with same function name call but will give different
result depending on the runtime parameters.


The ge
neral rules of mapping an EER model into an OODB schema are:


Step 1 Map each entity into a class of OODB.


Step 2 Map disjoint generalization into Inherit and Method of OODB


Step 3 Map isa into inherit operation in subclass of OODB.

Step 4 Map categoriza
tion into multiple inheritance of subclass of OODB. One
inheritance overrides another inheritance if there is a conflict.


Step 5 Map cardinality into bi
-
directional Association Attribute of OODB schema.


Tutorial question:


An Extended Entity Relationship

model has been designed for the database. Show the
object
-
oriented database schema for the implementation of the EER model design.

(Classes (50%), Attributes(50%).




















Boat
_
Person
Refugee
Non
-
refugee
d
Detention
_
center
Detain
Waiting
_
refugee
Accepted
_
refugee
d
Open
_
center
Reside
Departure
_
center
Stay
Country
Resettle
Engineer
Accountant
Doctor
c
Name
Birth
_
date
Birth
_
place
Status
Detain
_
Date
Reside
_
date
Stay
_
date
Resettle
_
date
Name
Name
Name
Name
Name
Name
Name
Center
_
name
Open
_
center
_
name
Depature
_
center
_
name
Country
_
name
n
n
n
1
1
n
1
1
Professional
isa
Name