0% found this document useful (0 votes)
7 views

Advance DBMS Chapter1

The document provides an overview of Object Oriented Database Management Systems (OODBMS), detailing its principles, advantages, and comparisons with Relational Database Management Systems (RDBMS). It discusses key concepts such as objects, classes, inheritance, encapsulation, and the limitations of RDBMS that necessitate the use of OODBMS for advanced applications. The document also outlines various approaches to implementing OODBMS and highlights the mandatory and optional features required for effective database management.

Uploaded by

mikiwendiye92
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Advance DBMS Chapter1

The document provides an overview of Object Oriented Database Management Systems (OODBMS), detailing its principles, advantages, and comparisons with Relational Database Management Systems (RDBMS). It discusses key concepts such as objects, classes, inheritance, encapsulation, and the limitations of RDBMS that necessitate the use of OODBMS for advanced applications. The document also outlines various approaches to implementing OODBMS and highlights the mandatory and optional features required for effective database management.

Uploaded by

mikiwendiye92
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 47

HU Department of Computer Science: Course Title

Advance Database System

Chapter One: Object Oriented Database


Management System (OODBMS )
Objectives: At the end of this unit, students should be able to:

 Understand Object Oriented Database.

 Understand the Comparison between OODBMS and RDBMS.

 Understand the various models of OO database.

 Understand and state the advantages and disadvantages of OO


database.

Page
What is Object Oriented Database?
 The term object-oriented database system was first introduced in 1985.
 Object oriented databases are designed and built according to the
object-oriented paradigm in which everything is modeled as objects
including the data.
 The data in O O D B M S is represented as collection of interacting

objects instead of collection of inter-related tables.


Object Oriented Database is a database in which information is
represented in the

form of objects as used in object-oriented programming.


OODs are different from relational databases which are
table-oriented.

Page
The requirements for a database to be Object Oriented
include:
1. It should be a Database Management System (DBMS): This means
that the OODBMS should provide the basic features for any database
system – persistence, concurrency, data recovery, secondary storage
management and ad hoc query facility.

2. It should support Polymorphism and Inheritance: This means that the


database system
should support all the requisite features of an object-oriented system
like encapsulation, complex objects, inheritance, polymorphism,
extensibility.

Page
Basic Concepts of O O Programming

A. Object and Class: A conceptual entity is anything that exists and can be
distinctly identified.

Examples: a person, an employee, Student, Course, etc.


 In an OO system, all conceptual entities are modeled as objects. An
object has structural properties defined by a finite set of attributes
and behavioral properties. The only difference between entity and
object is that entity has only state has no behavior, but object
contains both state and behavior.
 Each object is associated with a logical non-reusable and unique
object identifier (OID).
The OID of an object is independent of the values of its attributes.

Page
HU Department of Computer Science: Course Title Advance
Database System

 All objects with the same set of attributes and methods are grouped into
a class, and form instances of that class.

O I D has following characteristics:

1. It is generated by system.

2. It is unique to that object in the entire system.

3. It is used only by the system, not by the user.

4. It is independent the state of the object.

Class: Classes are classified as lexical classes and non-lexical classes.

1. A lexical class contains objects that can be directly represented by


their values.
2. A non-lexical class contains objects, each of which is represented by a
set of attributes and methods. Instances of a non-lexical class are
referred to by their

OIDs. Example: a person, an employee, Student, Course is non-lexical


classes.

Page
A.Attributes: The domain of an attribute of a non-lexical class A can be
one of the following:
1. A lexical class such as integer, string. An attribute with this domain
is called a data-valued attribute.

2. A non-lexical class. An attribute with this domain is called an entity-


valued attribute. Types of attributes include simple, Composite,
Derived and Multi valued, complex attribute (Complex attributes
are formed by arbitrarily nesting the composite and multi-valued
attributes. For example, a person owns more than one house, and each
house has more than one phone number. Then, the attribute phone is
represented as a complex attribute.)

Page
B.Method: A method of an object is invoked by sending a message
(which is normally the method name) to the object. Such a message-
passing mechanism represents a binary interaction between the sender
of the message and the recipient. A method‘s specification is represented
by a method signature, which provides the method name and
information on the types of the method‘s input parameters and its
results.
C.Abstraction: It is process of finding important aspects of an entity and
ignoring unimportant aspects such as implementation details. The
properties comprise two things: State and behavior. A state is models
through the attributes of object and behavior is models through operations
executed on data by object.
D.Encapsulation: An object contains both current state (Attributes) and
set of methods used to manipulate it. It is called encapsulation.

Page
E.Information Hiding: It is process of separates external properties of an
object from its internal properties, which are hidden from external
environment. These two concepts also related with abstraction. These two
concepts support the facility that internal properties of an object to be
changed without affecting applications that use it, provided external
properties remain same. It also provides data independence.
F. Inheritance: It is the special type of relationship between classes: The
inheriting class inherits the some or all properties of the base class depend
which mode of inheritance is used. Special classes or inheriting classes are
called subclasses and general classes are called super classes. Which mode of
inheritance is used. Special classes or inheriting classes are called subclasses
and general classes are called super classes.

Page
E.Generalization: It is method to create a superclass is called generalization.

F. Specialization: It is process of forming a sub class is called specialization.


I. Polymorphism: It means ―many forms‖. It is dynamic feature which
executes at run time of program. It involves the concept of overriding and
overloading.
J. Complex Objects: An object is called complex object if it contains many
sub objects and it is viewed as single object.

K.Relationships: It is basically an association between two things. These are


represented through reference attributes, typically implemented through
OID‘s. Types of binary relationships are:

1. One to One relationship


2. One to Many relationship
3. Many to One relationship
4. Many to Many relationship

Page
OO Data Model Vs Hierarchical Data Model

1. The nested structure of objects and the nested structure of records in


hierarchical databases are similar. The essential difference is that the
OO data model uses logical and non-reusable OIDs to link related
objects while the hierarchical model uses physical reusable pointers to
physically link related records. Hierarchical model has no object and
O I D concepts.
2. O O data model allows cyclic definition within object structures.
Example, a course can refer to other courses as its pre-requisite courses. To
support cyclic definition in the hierarchical data model, dummy record types
(e.g. prerequisite record) are needed.

Page
3. O O Data Model Vs Nested Relations: In the nested relation approach,
an attribute of a relation can itself be a relation. The nested relation is
stored physically within the base relation. This approach does not allow
the nested relation to be shared among relations. There may be a redundant
storage of data which can lead to updating anomalies. In the OO
approach, nested relations are simulated by using the OIDs of tuples of a
relation that are to be nested within a base relation. Because OIDs are used,
sharing of tuples of nested relation is possible. There is less redundancy.

Why Object Oriented Databases? There are three reasons for need of
OODBMS:

1. Limitation of RDBMS.
2. Need for Advanced Applications.
3. Popularity of Object Oriented Paradigm.

Page
Limitation of R D B M S
1. Poor representation of real world entities: The Relational model
cannot represent real world in proper way because it has only one
semantic that is table which can represent the real world entity in proper
way.

2. Normalization is necessary, but sometimes not useful:


Normalization in RDBMS to maintain the consistency of the database,
but some broken relations is not related to real world.

3. Overloading of semantic structure: Relational Dat


Model hasonly one semantic structure for representing
data and relationship that is table. Due to this, sometimes it becomes
very difficult to find out that which is going to model data or
relationship?

Page
4. Poor support for integrity and enterprise constraints: Constraints are
very much needed for your database have to be desired data. RDM
supports only limited number of constraints. The enterprise constraints
are those which are defined by industry standards.
5. Homogeneous data structure: RDM requires homogeneous
data structures like: a.RDM assumes both horizontal and
vertical homogeneity. b. Relational mathematics algebra has
only fixed number of operations due to which Relational
Model operations cannot be extended.
6. Tables can store only atomic/single value: No doubt, this is property
of RDM. But sometimes in many situations this property becomes its
limitation.

Page
7. Normalization is strongly recommended: Most of the situations, you
have must normalize the relation make the data consistency inside your
database.
8. Difficulty in handling recursive queries: There is very poor
support to handle recursive queries in RDBMS. For this you must know:

a.Depth of recursive query must be known.

b. You can use the transitive closure operations to handle recursive


queries in RDBMS.

Page
9. Impedance mismatch: SQL Data Manipulation Language (DML) is
lack computational completeness. To overcome this situation, you must
embed the SQL with any high programming language like C++, Java,
and C #. Due to there will be impedance mismatch between two
language SQL and higher programming language.
10.Poor support for long duration transactions: In RDBMS, generally
transactions are short lived and concurrency control techniques or
mechanisms are not good for long duration transactions.
11.Poor Schema Evolution support: Schema Evolution means making
changes to schema of database at runtime without interrupt the
execution of the application.
12.P oor Navigational Access: There is very
poo support for the navigational access in RDBMS.
There are some advanced applications needs the database with deeper
structural and functional foundation of capabilities that are not
provided by conventional database.

Page
Those Advanced Applications that need O O D B M S .
a) Computer Aided Design (CAD):
 In these types of applications, relevant data about buildings, airplanes and
integrated circuit chips is stored and managed. In this type of applications,
database design may be very large.
 Design in these types of applications is not static.
 This design is evolves through the times. Updates need to be propagated.
 These applications require version control and configuration management.
 These applications require complex objects for their development.
 Need long duration transactions because sometimes updates are for
reaching.
 Support for cooperative engineering because most of the times many
people work on same design.

Page
b)Computer Aided manufacturing (CAM):

 These application data is very much similar to CAD, but needs discrete
production.

 These applications must respond to real time events.

Page
 Generally algorithms and custom rules are used to respond to a particular
situation.

c)Computer Aided Software Engineering (CASE):

 These applications manage data about the phases of software


development life cycle.

 Design may be extremely large.

 Involves cooperative work.

 Need to maintain dependencies among components.

 Versioning and configuration management.

Page
1. Network Management Systems:

 Coordinates communication services across the network.


 These systems are used for such tasks as network path
management, problem management and network planning.
2. Other Applications: The Object Oriented Database also used in Office
Information Systems, Multimedia systems, Digital Publishing and
Geographic information Systems.

Popularity of Object Oriented Paradigm


Another domain that enforces the development of OODBMS is popularity
of object oriented programming paradigm because a real life situation
can be modeled in best way by

using object oriented programming.

Page
Approaches for O O D B M S

1. Relational Extension Based D B M S

2. Object/Relational D B M S

3. Pure O O D B M S
4. Relational Extension Based D B M S This is the first approach that is
adopted by industry and academia towards the implementations of OODBMS
is to extend the relational model to provide the OO features.

The advantages of this approach are:

 Stick to relational model.

 Have to OO features like complex object and UDT (User Defined Types).

Page
Design techniques for relational extensions: In mid-80‘s a researcher
named Stone braker in OODBMS field represent the design techniques in
this field with different proposals for Extended Type System for an
OODBMS should follow: Definition of new data types, Definition of

new operations of so defined data types. Implementation of access


methods. Optimized query processing for the queries on new data
types.

Page
2. Object/Relational D B M S

 These systems have relational and object based both features by the
definition.
 They provide similar objectives as provided by the Relational
Extension approach of R D B MS.
 In this approach, build an object layer on the top of relational system like
Open ODB and ODAPTER. They are built on different architectures like
Query Server or Client/Server.

3. Pure O O D B M S

 These type OODB‘s systems are not much popular because lack of
standards.
 There is no single definition for a single concept. For Example: An
Object has many definitions, but in RDB there is a fixed standard for or
single definition for each concept like table

Page
O O D B Model: It is data model that capture semantics of objects suited in
object based programming paradigm. An Object database must have
following features:

1. Database functionality like transaction management, concurrency


control.

2. Facility of Object Identity (OID).

3. Facility of encapsulation.

4. Facility of complex objects.

5. Inheritance not must but may useful.


OODB: It is permanently stored and sharable collection of objects suited
with an Object Data Model.

OODBMS: It is system which contains application programs which are


used to manage all object
oriented database activities like manipulation of objects. The OODBMS
paradigm manifesto set the minimum fundamental directional basis for an
OODBMS model .These characteristics can be classified as mandatory
and optional features:

Page
O O D B M S Mandatory Features
Support for complex objects: A OODBMS must support for complex
objects. Complex objects can be obtained by applying constructor on
basic objects.

Object Identity:

 It is the unique identifier associated with every object in the system.

 It has following characteristics:

 It is generated by system.

Page
 It is unique to that object in the entire system.

 It is used only by the system, not by the user.

 It is independent the state of the object.

Encaps lation: An OODBMS should enforce encapsulation through access


objects only.

Types or Classes: A OODBMS must support for one of them types or


classes.
Inheritance a n d Hierarchies: A OODBMS must support for concept of
super classes and subclasses. The types of heritance can be: substitution,
inclusion, constraint, specialization D y n a m i c Binding: An OODBMS must
support concept of dynamic binding in programming lang age s ch as
overloading, overriding a n d late binding

Page
Comp nationally Complete D M L : To provide a support for data
processing database have use computationally completely language like SQL-
3.
E x ten sible set of d a ta types: A
OODBMS must support for used defined data
types.
Da t a Persistence: This is basic requirement for any DBMS.A OODBMS
must provide persistent by storing object in proper way.

M a n a g i n g very large databases: A OODBMS must support for large


databases.
Conc rrent Users: This is basic requirement for any DBMS. It must support
for concurrency control.

Transaction Manage me nt : This is also basic requirement of any DBMS.


Q er y L ang age: This is also a basic
requirement of any DBMS. This query language must be
computationally complete.

Page
O O D B M S Optional Features.
1. Multiple Inheritances: Multiple inheritances is not directly support by
multiple objects oriented programming languages. An OODBMS can also
support for multiple inheritance.
2. Type checking and inferencing: Type Checking and Inferencing features
can be added to Object Databases.

3. Long duration and Nested Transactions: Relational database


transactions are short-
lived. An OODBMS can support for long duration transactions and also for
nested transactions.

4. Distributed databases: An object database may have support for


distributed database
which is a collection of multiple databases logically related and
distributed over the network.

Page
5. Versions: An OODBMS can support for version control and
configuration management.

Achievements of O O D B M S
1. Support for User Defined data types: OODBs provides the facilities of
defining new user defined data types and to maintain them. OODB’s allow
creating new type of relationships: OODBs allow creating a new type of
relationship between objects is called inverse relationship (a binary
relationship).
2. No need of keys for identification: Unlike, relational model, object data
model uses object identity (OID) to identify object in the system.

Page
1. Development of Equality predicates: In OODBs, four types equality
predicates are:

a. Identity equality

b. Value equality of objects

c. Value equality of properties Identity

d. Equality of properties.
2. No need of keys for identification: Unlike, relational model, object data
model uses object identity (OID) to identify object in the system.

Page
1.Development of Equality predicates: In OODBs, four
types equality predicates are:
A. Identity equality
B. Value equality of objects
C.Value equality of properties
D.Identity equality of properties
6.No need of joins for OODBMS’s: OODBs has ability to
reduce the need of joins.
7.Performance gains over R D B M S: Performance gains
changes application to application. Applications that make the use of
object identity concept having performance gains over RDBMS‘s.
8.Provide Facility for versioning management: The
control mechanisms are missing in most of the RDBMS‘s, but it is
supported by the OODBMS‘s.

Page
6. Support for nested and long Duration transactions: Most of the
RDBMS‘s do not support for long and nested transactions, but
OODBMS‘s support for nested and long duration transactions.
7. Development of object algebra: Relational algebra is based on
relational mathematics and fully implemented, but object algebra has not
been defined in proper way. Five fundamental object preserving operators
are union, difference, select, generate and map.

Page
Weaknesses of O O D B M S
1. Coherency between Relational and Object Model: Relational
databases are founded in every organization. To overcome relational
databases, object databases have to be providing coherent services to
users to migrate from relational database to object database. Architecture
of Relational model and Object model must be providing some coherency
between them.
2. Optimization of Query Expression: Query expression optimization
is done to increase the performance of the system. Optimization of
queries is very important for performance gains. But due to following
reasons it is difficult to optimize queries in object databases:

 User defined data types

 Changing variety of types

 Complex objects, methods and encapsulation

 Object Query language has nested structure

 Object Identity.

Page
3. No fixed query algebra for OODBMS’s: due to lack of the standards
in OODBMS, there is no any standard query algebra for OODB. Lack of
standard query algebra becomes one of the reasons for problem of
query optimization. There are different query
languages for different object databases.
4.No full-fledged query system: Query system also not fully
implemented. Some query facilities lacks in Object databases like nested
sub-queries, set queries and aggregation function.

Page
5. No facility for Views: In relational databases, views are temporary
tables. Object databases
having no facility for views. An object oriented view capability is difficult
to implement due to the features of Object Model such as object identity.
Object oriented programming concepts like
inheritance and encapsulation makes the difficult to implement views
in object databases.

6. Security problems in Object databases: Security is


related to authentication, authorization and accounting.
Discretionary Access Control (DAC), mandatory access control (MAC)
security policies are implemented in object databases to secure data. In
some systems provide security on the basis of object oriented concepts like
encapsulation.

Page
7. No support for schema evolution with OODBs: Most object databases
do not allow schema
evolution. Schema Evolution is facility which allows changing the
schema at run time
such as adding a new attributes or methods to the class, adding new
superclass to the class.

8. Consistency constraints mechanisms are not fully implemented:


Only limited numbers of features are provided by OODBMS‘s for uniqueness
of constraints, integrity constraints and other enterprise constraints.
9. No full-fledged facilities to implement complex objects: No doubt,
object oriented
databases provide some facilities to implement the concept of complex
objects. But there is no full – fledged implementation of complex objects.

Page
10.Interoperability between O O D B and Object Oriented Systems:
In Object Oriented Programming objects are transient in nature. To provide
persistent to data, OODB and OO systems need to be interoperable. Many
problems may arise during interoperable between OODB and OO systems.
11.Limited performance gains over R D B s Decrease in performance:
Performance gains changes application to application. Applications that
make the use of object identity concept having
performance gains over RDBMS‘s. But application that requires bulk
database loading and does not make use of OID then performance of
OODBMS is not good.
12.Some basic features are not present: Some basic features like triggers,
meta-data management and constraints such as UNIQUE and NULL not
present in object databases.

Page
Parameters of O O D B M S and R D B M S Models

Page
Advantages of O O D B M S

1.Enriched modeling capabilities


 The object-oriented data model allows the 'real world' to be modeled more
closely. The object, which encapsulates both state and behavior, is a more
natural and realistic representation of real world objects. An object can
store all the relationships it has with other objects, including many-to-
many relationships, and objects can be formed into complex objects that
the traditional data models cannot cope with easily.

2.Extensibility
 OODBMSs allow new data types to be built from existing types. The
ability to factor out common properties of several classes and form them
into a superclass that can be shared with subclasses can greatly reduce
redundancy within system.

Page
3.Capable of handling a large variety of data types
 Unlike traditional databases (such as hierarchical, network or relational), the
object oriented database are capable of storing different types of data, for
example, pictures, voice video, including text, numbers and so on.
4.Removal of impedance mismatch
 A single language interface between the Data Manipulation Language
(DML) and the programming language overcomes the impedance
mismatch. This eliminates many of the efficiencies that occur in mapping a
declarative language such as S Q L to an imperative language such as
'C++'.
 Most OODBMSs provide a DML that is computationally complete compared

with SQL, the 'standard language of RDBMSs.


5.More expressive query language
 Navigational access from the object is the most common form of data access
in an OODBMS.
 Navigational access is more suitable for handling parts explosion, recursive
queries, and so on.

Page
4.Support for schema evolution
The tight coupling between data and applications in an OODBMS makes
schema evolution more feasible.
7.Support for long-duration, transactions
 Current relational DBMSs enforce serializability on concurrent
transactions to maintain database consistency.
 OODBMSs use a different protocol to handle the types of long-
duration transaction
that are common in many advanced database application.
8.Applicability to Advanced Applications
There are many areas where traditional DBMSs have not been particularly
successful, such as,
Computer-Aided Design (CAD), Computer-Aided Software
Engineering (CASE),
and Multimedia Systems. The enriched modeling capabilities of
OODBMSs have made them suitable for these applications.

Page
Improved performance
There have been a number of benchmarks that have suggested OODBMSs
provide significant performance, improvements over relational
DBMSs. The results showed an
average 30-fold performance improvement for the O O D B M S over the
RDBMS.
Disadvantages of O O D B M S S
1. Lack of universal data model
 There is no universally agreed data model for an OODBMS.
 Most models of OODBMS lack a theoretical foundation.
2. Lack of experience:
 In comparison to RDBMSs the use of OODBMS is still relatively
limited.
 OODBMSs are still very much geared towards the programmer, rather
than the naïve end-user. Also there is a resistance to the acceptance of
the technology.

Page
3. Lack of standards:
There is a general lack of standards of OODBMSs. We have already
mentioned that there is not universally agreed data model. Similarly,
there is no standard object-oriented query language.

4. Competition:

 Perhaps one of the most significant issues that face OODBMS vendors
is the competition posed
by the R D B M S and the emerging O R D B M S products. These
products have an established user base with significant experience
available.

 SQL is an approved standard and the relational data model has a solid
theoretical formation and relational products have many supporting
tools to help both end-users and developers.

Page
5. Query optimization compromises encapsulations
 Query optimization requires understanding of the underlying
implementation to access the database efficiently. However, this
compromises the concept of incrassation (encapsulations).

6. Locking at object level may impact performance

 Many OODBMSs use locking as the basis for concurrency control


protocol.
 However, if locking is applied at the object level, locking of an
inheritance hierarchy may be problematic, as well as impacting
performance.

7. Complexity
 The increased functionality provided by the OODBMS (such as the
illusion of a single level storage model, pointer sizzling, long
duration transactions, version management, and

schema evolution makes the system more complex than that of


traditional DBMSs.

 These complexity leads to products that are more expensive and more
difficult to use.

Page
9. Lack of support for security
 Currently, OODBMSs do not provide adequate security mechanisms.
 The user cannot grant access rights on individual objects or classes.
Object Oriented Databases Models: Unified Modeling Language
(UML Models)
 UM L provides a mechanism in the form of diagrammatic notation and
associated language syntax to cover the entire life cycle.
 UML can be used by software developers, data modelers, and
database designers, and
so on to define the detailed specification of an application. They
also use it to specify the environment consisting of users, software,
communications, and hardware to implement and deploy the
application.

Page
 UML combines commonly accepted concepts from many object-oriented
(O-O) methods and methodologies.

 UML is generic, and is language-independent and platform-


independent.
 Software architects can model any type of application,
running programming language, or network, in UML.

 UML defines nine types of diagrams divided into to


two categories:

Page
1.Structural Diagrams
 Class diagram
 Object diagram
 Component diagram
 Deployment diagram
2.Behavioral Diagrams.
 Use case diagram
 Sequence diagram
 Collaboration diagram
 Statechart diagram
 Activity diagram.

End of chapter One

Page
Assignment one (5%)

Writes a short summary of pages for each of them. (Use your own
hand writing do not use computers)
1.Types of database models.
2.The concept of Normalization.
3.The concept of database views.

Page

You might also like