Object and Object-Relational Databases: Concepts, Models Languages, and Standards
Object and Object-Relational Databases: Concepts, Models Languages, and Standards
Transient objects
Exist in executing program
Disappear once program terminates
Persistent objects
Stored in database and persist after program
termination
Naming mechanism
Reachability
Inheritance
Definition of new types based on other
predefined types
Leads to type (or class) hierarchy
Type: type name and list of visible (public)
functions
Format:
• TYPE_NAME: function, function, ...,
function
Polymorphism of operations
Also known as operator overloading
Allows same operator name or symbol to be
bound to two or more different implementations
Depending on type of objects to which operator
is applied
Multiple inheritance
Subtype inherits functions (attributes and
methods) of more than one supertype
Array type
Reference elements using []
CARDINALITY function
Return the current number of elements in an
array
INSTANTIABLE
Specify that UDT is instantiable
Causes one or more tables to be created
User-defined type
Specify methods (or operations) in addition to
the attributes
Format:
CREATE TYPE <TYPE-NAME> (
<LIST OF COMPONENT ATTRIBUTES AND THEIR TYPES>
<DECLARATION OF FUNCTIONS (METHODS)>
);
Extent
Contains all persistent objects of class
Key
One or more properties whose values are
unique for each object in extent
Factory object
Used to generate or create individual objects
via its operations
Result of a query
Any type that can be expressed in ODMG
object model
OQL orthogonal with respect to specifying
path expressions
Attributes, relationships, and operation names
(methods) can be used interchangeably within
the path expressions
Named query
Specify identifier of named query
OQL query will return collection as its result
If user requires that a query only return a single
element use element operator
Aggregate operators
Membership and quantification over a
collection