0% found this document useful (0 votes)
17 views34 pages

ADBS - Chapter 1

ADBS

Uploaded by

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

ADBS - Chapter 1

ADBS

Uploaded by

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

Advanced Database Systems

(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.

 As database systems were applied to a wider range of applications, such as


computer-aided design and geographical information systems, limitations
imposed by the relational model emerged as an obstacle.

 The solution was the introduction of object-based databases, which allow


one to deal with complex data types.

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.

 In the 1980s With the advent of Object Oriented methodologies and


languages, integration of database capabilities with object oriented
programming language provided a unified programming environment.

 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

The major types of data models in the history of Databases are


oHierarchical model
oNetwork Model
oRelational Model
oObject oriented Model
17
Object Based Database Systems
An object-oriented database (OOD) is a database system that can work with
complex data objects.

In object-oriented programming, everything is an object, and many objects


are quite complex, having different properties and methods.

Object database management systems extend the object programming


language with transparently persistent data, concurrency control, data
recovery, associative queries, and other database capabilities.

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).

ORD supports the basic components of any object-oriented database model


in its schemas and the query language used, such as objects, classes and
inheritance.

An object-relational database may also be known as an object relational


database management systems (ORDBMS).

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.

It allows lower-level entities to inherit the attributes of higher-level entities.

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:

create function Name (firstname varchar(20), lastname varchar(20))

returns Name

begin

set self.firstname = firstname;

set self.lastname = lastname;

End;
32
Implementing O-R Features
Object-relational database systems are basically extensions of existing
relational database systems.

Changes are clearly required at many levels of the database system.

However, to minimize changes to the storage-system code (relation storage,


indices, etc.), the complex data types supported by object-relational systems
can be translated to the simpler type system of relational databases.

33
Quiz

Explain about :
I. Object Identity,
II. Object Structure,
III. and Type Constructors

You might also like