You are on page 1of 25

OBJECT TECHNOLOGY

And OBJECT ORIENTED


DATABASE MANAGEMENT
SYSTEM
Object Technology
• At the simplest level , anything that we see,
touch , smell or feel is an object.

• The basis of object technology can be traced


back to the 1960s . A language called as
Simula( abbreviation for simulation language)
first used the ideas of object technology.
• It was designed to build precise models of
complex and large physical such as buildings,
aircrafts, machines. Etc
Operati
ons

OBJE
CT Object=
Operations +
DAT Data
A
A program is a collection of
objects.

Operatio Operatio
ns ns
OBJE OBJE
CT CT

DATA DATA

Program= Collection of
Objects
Attributes and methods
• In object technology , operations or
functions are called methods. On the
other hand variables are called
attributes. Ear
s Eye
s

Nos
e
Tail

Leg
s
Rabbit Object and its
attributes
MESSAGES
• We can pass a message to
an object , requesting it to
perform a specific action.
• What message is specifically
required to perform a
function.
• Each object must publish a
list of methods that it
contains.
I can hear I can smell

I can see
I can run
Practical example of an
object

Attributes Methods

Roll No
Name •GetName
Class •GetClass
Division •GetDivision
Gender •GetGender
Date Of Birth •GetDateofBirth
Classes of object
• Another key concept related to
object technology is that of class. A
class Is a generic form of objects.
• From a programming perspective, we
declare an integer or a floating as int
i:
float f:
Class Object
Int i
Float f
Vehicle car
1234
Object

Class 4567
Object

7890
Object

• Figure describes a class with three objects corresponding to the class with their
unique identifier.

• A class has general characteristics , which all its object automatically inherits.
ABSTRACTION
• The concept of abstraction is very
important and fundamental in object
technology. Abstraction allows an
analyst to concentrate only on the
essential aspects of objects and to
ignore their non-key aspects. It
facilitates postponing of many
decisions to as late a date as
possible.
Encapsulation
• Encapsulation generally protects the
data in an object. One object cannot
interfere with the data within another
object except though properly
authorized requests.
CREATE UPDATE

EMPLOYEE

Employee object give the view of a black box , it tells the outside world
that its interface is made up of two methods, create and update. How
they work internally is not known.
• Thus, the main idea of encapsulation is
hiding of internal details of an object.
Changes to internal details doesn't cause
ripple changes to other object.
• By using encapsulation object, become

Message
self-sufficient and fairly independent of
each other.

Interface

Interface
Interface

? Message
Message
Interface
Message
Inheritance
• Inheritance is the process by which one object
acquires the properties of one or more other
objects.
• It involves sharing of attributes and operations
or methods among classes based on a
hierarchical relationships.
• A class can be created at a broad level and
then refined progressively into finer
subclasses. Each subclasses incorporates, or
inherits all the properties of its super class to
which it can add its own properties.
Object technology and
RDBMS
Identifying a record uniquely.
Identifying a RDBMS record uniquely in a table is the primary key associated

with that record. But In object technology, an object has an implicit object ID,
which helps the underlying technology to identify that record.
The main difference is that the primary key is explicit i.e visible to the entire

world whereas the object i.d is implicit i.e hidden from the external world.
Mapping classes to
tables
• If we need to store classes(actually objects) on a disk ,
there must be some way of mapping them to RDBMS
structures.
• Three possibilities of Mapping can emerge,
• One object maps to exactly one table.
• One object maps to more than one table.
• More than one object map to one table.
One object maps to one table

One object maps to multiple tables

Multiple objects map to one table


• Partitioning
• Horizontal partitioning- if a few
instances (i.e. objects ) of a class
are referenced to more
frequently than others.
• Vertical Partitioning- there are
after situations when some
attributes of a class are more
frequently accessed then other.
Object oriented database
systems
• Object oriented database (OODBMS) provides a persistent
(i.e. permanent storage) for objects.
• OODBMS is generally used in multiuser client server
environment. It controls concurrent access to objects,
provides locking mechanism and transactional features,
offers security features at the object level.
• The biggest difference between RDBMS and OODBMS is that
former stores the data related to an object in a table
whereas the latter stores the state of an object.
• Object definition language(ODL)-Is similar to the concept of the
data Definition language(DDL) of SQL.

• Object query language(OQL)- is similar to the concept of Data


Manipulation language. It provides support for most common
SQL select statements forums, including joins. However , it
does not provide support for SQL insert, update or delete.

• Object Manipulation language- is an extension of OQL . OML is


language specific. Thus OQL would always be the same for
Java, C++ and C#, But OML would be different for these
languages .OML includes support for SQL INSERT , UPDATE and
DELETE.
When should OODBMS be
used?
In RDBMS an object is
Object
stored in the disk in Object
forms of rows and
columns

In OODBMS, an Object
on the disk has the Object
same layout.

RDBMS OODBMS

RDBMS VS OODBMS Storage concept


• Object databases should be used when there is
complex data and/or complex data relationships.
• Object databases work well with:
• CAS Applications (CASE-computer aided software
engineering, CAD-computer aided design, CAM-
computer aided manufacture)
• Multimedia Applications
• Object projects that change over time.
• Commerce
Advantages of OODBMS.
• Quicker access to information- A
OODBMS keeps track of the objects
via their unique object Id’s . Complex
foreign key transversals are avoided.
• Creating new data types-An OODBMS
does not restrict the type of data that
can be stored on the disk by declaring
an appropriate object description.
• Integrating with OOP languages-
OODBMS is actually an extension of
OOP languages, such as Java and C+
+. OODBMS deals with one object at
a time, just as an OOP language
would do. Moreover OODBMS
preserves the original characteristics
of an object, because it stores it as
is.

Java Object
• How Data is Stored
• Two basic methods are used to store
objects by different database vendors.
• Each object has a unique ID and is
defined as a subclass of a base class,
using inheritance to determine attributes.
• Virtual memory mapping is used for
object storage and management.
• Comparison to Relational Databases
• RDBMS
• Relational databases store data in tables that are two
dimensional.
• The tables have rows and columns.
• Relational database tables are "normalized" so data is not
repeated more often than necessary.
• All table columns depend on a primary key (a unique value in the
column) to identify the column.
• Once the specific column is identified, data from one or more
rows associated with that column may be obtained or changed.
• OODBMS
• To put objects into relational databases, they must be
described in terms of simple string, integer, or real number
data.
• For instance in the case of an airplane. The wing may be
placed in one table with rows and columns describing its
dimensions and characteristics. The fuselage may be in
another table, the propeller in another table, tires, and so
on.
• Breaking complex information out into simple data takes
time and is labour intensive. Code must be written to
accomplish this task.

You might also like