Advance DBMS Chapter1
Advance DBMS Chapter1
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
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.
Page
Basic Concepts of O O Programming
A. Object and Class: A conceptual entity is anything that exists and can be
distinctly identified.
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.
1. It is generated by system.
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.
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.
Page
OO Data Model Vs Hierarchical Data Model
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.
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:
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.
Page
Generally algorithms and custom rules are used to respond to a particular
situation.
Page
1. Network Management Systems:
Page
Approaches for O O 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.
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
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:
3. Facility of encapsulation.
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 generated by system.
Page
It is unique to that object in the entire system.
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.
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.
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
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:
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.
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.
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
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
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).
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
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.
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.
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