ADBS - Chapter 1
ADBS - Chapter 1
(CoSc2072)
Chapter one
Concepts for Object-Oriented Databases
Chapter Contents
Overview of Object-Oriented Concepts
Object Identity, Object Structure, and Type
Constructors
Encapsulation of Operations, Methods, and
Persistence
Type Hierarchies and Inheritance
2
Object Based Database Systems
Traditional database applications consist of data-processing tasks, such as
banking and payroll management, with relatively simple data types that are
well suited to the relational data model.
12
Object Based Database Systems
Relational models were limiting in the kind of data that could be held, the
rigidity of the structure, and the lack of support for new data types such as
graphics, xml, 2D and 3D data.
This led to the development of OODB and OODBMS where objects are
stored in databases rather than data such as integers, strings or real numbers.
13
What is Object oriented database?
14
What is Object oriented database?
15
What is Object oriented database?
16
Object Based Database Systems
The type of a database is decided by the data model used in he design of the
database.
Data models are data structures which describe how data are represented and
accessed. Data models must be simple and intuitive to enable applications
18
Object Relational DBMS
An object-relational database (ORD) is a database management system
(DBMS) that's composed of both a relational database (RDBMS) and an
object-oriented database (OODBMS).
19
Reasons for using ORDBMS over RDBMS
Storage requirements of newer applications - Conventional RDBMSs cannot
handle the data like engineering designs, scientific experiments, GIS, and
multimedia data.
Handling of data stored for newer applications – retrieve and manipulate data
stored for newer applications like other data with RDBMS functionalities.
Ability to define user defined data types – to handle new type of data as and
when required.
Reusability nature of objects – One of the main features of using objects, and
methods.
Database extensibility – easy addition of data types and operations
20
Object-Oriented Model Vs Relational Model
21
Object-Oriented Model Vs Relational Model
22
Fundamentals of object oriented database
23
Fundamentals of object oriented database
24
Fundamentals of object oriented database
25
Object Definition Language
ODL creates a layer of abstraction making data language and database
independent (Standalone OODB or Object Relational DB) to allow
applications to move between compliant databases or different language
implementations.
ODL defines three components of the object oriented data model:
Abstraction
Inheritance
Encapsulation
26
Data Abstraction
Data Abstraction is a process of hiding unwanted or irrelevant details from
the end user.
It provides a different view and helps in achieving data independence
which is used to enhance the security of data.
The database systems consist of complicated data structures and relations.
There are three levels of abstraction
Physical level
Logical level
View level
27
Encapsulation
Encapsulation in object oriented means an object contains both the data
structures and the methods to manipulate the data structures.
The data structures are internal to the object and are only accessed by other
objects through the public methods.
Encapsulation ensures that changes in the internal data structure of an object
does not affect other objects provided the public methods remains the same.
Encapsulation provides a form of data independence.
28
Inheritance
Inheritance is an important feature of Generalization and Specialization.
For example, the attributes of a Person class such as name, age, and gender
can be inherited by lower-level entities such as Student or Teacher.
29
Complex Data Types
Traditional database applications have conceptually simple data types.
The basic data items are records that are fairly small and whose fields are
atomic.
A complex data type is usually a composite of other existing data types.
For example, you might create a complex data type whose components
include built-in types, opaque types, distinct types, or other complex types.]
With complex type systems we can represent E-R model concepts, such as
composite attributes, multivalued attributes, generalization, and specialization
directly, without a complex translation to the relational model.
30
Structured Types and Inheritance in SQL
Structured types allow composite attributes of E-R designs to be represented directly.
For instance, we can define the following structured type to represent a composite
attribute name and address with component attribute .
31
Structured Types and Inheritance in SQL
Constructor functions are used to create values of structured types. A function with the
same name as a structured type is a constructor function for the structured type.
For instance, we could declare a constructor for the type Name like this:
returns Name
begin
End;
32
Implementing O-R Features
Object-relational database systems are basically extensions of existing
relational database systems.
33
Quiz
Explain about :
I. Object Identity,
II. Object Structure,
III. and Type Constructors