SlideShare a Scribd company logo
14
Most read
17
Most read
19
Most read
Chapter 1
Concepts for Object Oriented
Databases
By: Melaku Y
Chapter Outline
1. Overview of O-O Concepts
2. O-O Identity, Object Structure and Type
Constructors
3. Encapsulation of Operations, Methods and
Persistence
4. Type and Class Hierarchies and Inheritance
2
Introduction
• Data model is used to describe the structure of the database
• Traditional Data Models:
 Hierarchical (1960)
 Network (since mid-60’s)
 Entity-relationship Model
 Relational (since 1970 and commercially since 1982)
• Object Oriented (OO) Data Models since mid-90’s
• Reasons for creation of Object Oriented Databases
 Need for more complex applications
• Give the designer to specify both the structure of complex objects
and the operations
 Increased use of object-oriented programming languages
• Difficult to integrate with traditional database
 Need for additional data modeling features 3
1.1 Overview of Object-Oriented Concepts(1)
• As commercial object DBMSs became available, the need for a
standard model and language was recognized.
• Main Claim: OO databases try to maintain a direct correspondence
between:
 real-world and database objects so that objects do not lose their
integrity and identity and can easily be identified and operated upon
• Object: A uniquely identifiable entity
 That contains both the attributes that describe the state of a ‘real
world’ object and the actions that are associated with it. (Simula
1960s)
• Object: has two components:
 state (value) and behavior (operations)
Similar to program variable in programming language, except that it
will typically have a complex data structure as well as specific
operations defined by the programmer 4
Overview of Object-Oriented Concepts (2)
• In OO databases,
 objects may have an object structure of arbitrary complexity in order to
contain all of the necessary information that describes the object.
• In contrast, in traditional database systems,
 information about a complex object is often scattered over many
relations or records, leading to loss of direct correspondence between
a real-world object and its database representation.
• Persistent vs transient object
 Transient object: exist only during program execution
 Persistent object: exist beyond program termination
Stored by OO databases permanently in secondary storage
 Allow the sharing objects among multiple programs and applications.
 What needed: indexing and concurrency(DBMS Features)
5
Overview of Object-Oriented Concepts (3)
• The internal structure of an object in OOPLs
 includes the specification of instance variables, which hold the
values that define the internal state of the object.
• An instance variable is similar to the concept of an attribute,
 except that instance variables may be encapsulated within the
object and thus are not necessarily visible to external users
• Some OO models insist that
 all operations a user can apply to an object must be predefined.
This forces a complete encapsulation of objects.
 Issues: users required to know attribute name to retrieve specific
objects and any simple retrieval requires a predefined operation
6
Overview of Object-Oriented Concepts (4)
• To encourage encapsulation, an operation is defined in two parts:
 signature or interface of the operation, specifies the operation
name and arguments (or parameters).
 method or body, specifies the implementation of the operation.
 Operations can be invoked by
 passing a message to an object, which includes the operation name
and the parameters.
 The object then executes the method for that operation.
 This encapsulation permits
 modification of the internal structure of an object, as well as
 the implementation of its operations, without the need to disturb
the external programs that invoke these operations
7
Overview of Object-Oriented Concepts (5)
• Type and Class hierarchies and Inheritance
 permits specification of new types or classes that inherit much of their
structure and/or operations from previously defined types or classes.
 this makes it easier to develop the data types of a system incrementally
and to reuse existing type definitions when creating new types of
objects.
 Operator overloading(operator polymorphism)
 refers to an operation’s ability to be applied to different types of objects
 in such a situation, an operation name may refer to several distinct
implementations, depending on the type of object it is applied to.
8
1.2 Object Identity, Object Structure, and Type
Constructors (1)
• Unique Identity:
 an OO database system provides a unique identity to each independent
object stored in the database.
 this unique identity is typically implemented via a unique, system-
generated object identifier(OID)
the main property of OID
immutable (should not change). this preserves the identity of the real-
world object being represented.
used only once, even if an object is removed from the database, its OID
should not be assigned to another object
Object may given one or more names meaningful to the user
identifies a single object within a database.
intended to act as ‘root’ objects that provide entry points into the
database. 9
Object Identity, Object Structure, and Type
Constructors (3)
• Type Constructors:
 In ODBs, a complex type may be constructed from other types by
nesting of type constructors.
• The three most basic constructors are:
 atom (basic built-in data types)
 tuple (compound or composite type)
• struct Name<FirstName: string, MiddleInitial: char, LastName:
string>
• struct CollegeDegree<Major: string, Degree: string, Year: date>
 collection (multivalued) => set, array, list, bag, dictionary
 The atom constructor is used to represent all basic atomic values
 integers, real numbers, character strings, Booleans, other
10
Object Identity, Object Structure, and Type
Constructors (4)
• Tuple constructor
 create structured values and objects of the form <a1:i1, a2:i2, … ,
an:in>
• Set constructor
 create objects or literals that are a set of distinct elements {i1, i2, … ,
in}, all of the same type
• Bag constructor
 Same as set but elements need not be distinct
• List constructor
 create an ordered list [i1, i2, … , in]
 Array constructor
 create a single-dimensional array of elements of the same type
 Dictionary constructor
 creates a collection of key-value pairs (K, V) 11
Object Identity, Object Structure, and Type
Constructors (5)
12
1.3 Encapsulation of Operations, Persistence of
Objects(1)
• Encapsulation
 One of the main characteristics of OO languages and systems
 Related to the concepts of abstract data types and information
hiding in programming languages
 In traditional database models and systems this concept was not
applied
 since it is customary to make the structure of database objects
visible to users and external programs
The relation and its attributes can be accessed using generic
operations.
 The concept of encapsulation means that
 Object contains both data structure and the set of operations used to
manipulate it.
13
1.3 Encapsulation of Operations,
Methods, and Persistence (2)
• The concept of information hiding means that
 external aspects of an object is separated from its internal details,
which are hidden from the outside world.
 The external users of the object are only made aware of the
interface (signature) of the operation
• Specifying Object Behavior via Class Operations (methods):
 The main idea is to define the behavior of a type of object based
on the operations that can be externally applied to objects of that
type.
 In general, the implementation of an operation can be specified in a
general-purpose programming language that provides flexibility
and power in defining the operations
14
Encapsulation of Operations, Methods, and
Persistence (4)
 For database applications, the requirement that all objects be
completely encapsulated is too stringent.
 One way of relaxing this requirement is to divide the structure
of an object into visible and hidden attributes (instance
variables).
 An operation is typically applied to an object by using the
dot notation.
15
16
Encapsulation of Operations, Methods, and
Persistence (6)
• Specifying Object Persistence via Naming and Reachability:
 Transient objects
• exist in the executing program and disappear when program
terminates.
 Persistent objects
• stored in the database and persist after program termination.
• Mechanisms to make an object persistent
 Naming Mechanism:
• name can be given to an object via a specific statement or operation in the
program
• the named objects are used as entry points to the database through which
users and applications can start their database access
 Reachability Mechanism:
• Make the object reachable from some other persistent object.
• An object B is said to be reachable from an object A if a sequence of
references in the object graph lead from object A to object B.
17
Encapsulation of Operations, Methods, and
Persistence (6)
18
1.4 Type and Class Hierarchies and Inheritance (1)
• Type (class) Hierarchy
 A type is defined by
 assigning type name and defining attributes (instance variables) and
operations (methods).
has a type name and a list of visible (public) functions
• Specifications: TYPE_NAME: function, function, . . . , function
Example:
• PERSON: Name, Address, Birthdate, Age, SSN
• Subtype:
 When the designer or user must create a new type
 that is similar but not identical to an already defined type
 inherits all the functions of supertype
19
Type and Class Hierarchies and Inheritance (3)
• Example (1):
 PERSON: Name, Address, Birthdate, Age, SSN
 EMPLOYEE: Name, Address, Birthdate, Age, SSN, Salary,
HireDate, Seniority
 STUDENT: Name, Address, Birthdate, Age, SSN, Major, GPA
• OR:
 EMPLOYEE subtype-of PERSON: Salary, HireDate, Seniority
 STUDENT subtype-of PERSON: Major, GPA
20
Type and Class Hierarchies and Inheritance (4)
• Example (2):
 GEOMETRY_OBJECT: Shape, Area, ReferencePoint
 RECTANGLE subtype-of GEOMETRY_OBJECT: Width, Height
 TRIANGLE subtype-of GEOMETRY_OBJECT: Side1, Side2, Angle
 CIRCLE subtype-of GEOMETRY_OBJECT: Radius
21
Thank you
22

More Related Content

PPT
Data models
PPTX
Common MongoDB Use Cases
PPT
Sql injection
PDF
SQL - RDBMS Concepts
PPTX
Network programming in java - PPT
PPTX
Software requirements specification
PPTX
Architectural views
PPTX
Remote procedure call on client server computing
Data models
Common MongoDB Use Cases
Sql injection
SQL - RDBMS Concepts
Network programming in java - PPT
Software requirements specification
Architectural views
Remote procedure call on client server computing

What's hot (20)

PDF
Domain specific Software Architecture
PDF
MVC in PHP
PPT
SOAP, WSDL and UDDI
PPTX
Nosql databases
PPTX
android sqlite
PPTX
Object Oriented Testing
PPT
03 namespace
PDF
Asp.net mvc basic introduction
PPTX
Data mining tasks
PDF
Advance Java Tutorial | J2EE, Java Servlets, JSP, JDBC | Java Certification T...
PPTX
Introduction to NoSQL Databases
PDF
An introduction to MongoDB
PPTX
PHP FUNCTIONS
PPT
Software Project Management Basics
PPTX
Integrity Constraints
PPTX
Project scheduling and tracking
PPT
Dbms models
PDF
OAuth 2.0 Security Reinforced
PPSX
Sessions and cookies
PPTX
Software development process basic
Domain specific Software Architecture
MVC in PHP
SOAP, WSDL and UDDI
Nosql databases
android sqlite
Object Oriented Testing
03 namespace
Asp.net mvc basic introduction
Data mining tasks
Advance Java Tutorial | J2EE, Java Servlets, JSP, JDBC | Java Certification T...
Introduction to NoSQL Databases
An introduction to MongoDB
PHP FUNCTIONS
Software Project Management Basics
Integrity Constraints
Project scheduling and tracking
Dbms models
OAuth 2.0 Security Reinforced
Sessions and cookies
Software development process basic
Ad

Similar to Concepts for Object Oriented Databases.ppt (20)

PPTX
MIT302 Lesson 2_Advanced Database Systems.pptx
PPTX
Odbms concepts
PPTX
Advanced Topics on Database - Unit-2 AU17
PPTX
10-System-ModelingFL22-sketch-19122022-091234am.pptx
PPTX
PPTX
Adbms 10 complex object management
PPT
Chapter 1 - Concepts for Object Databases.ppt
PPTX
Object oriented modeling
PDF
Advanced DBMS- Unit 1.pdf Advanced DBMS dives into complex data management fo...
PPTX
DSD Unit 1 Abstract Data Type data structures design notes.pptx
PPT
Overview of Object-Oriented Concepts Characteristics by vikas jagtap
PDF
OODBMS Concepts - National University of Singapore.pdf
PPTX
Object oriented database concepts
DOCX
Getting Started with Entity Framework in .NET
PPTX
chapterOne.pptxFSdgfqdzwwfagxgghvkjljhcxCZZXvcbx
PPTX
Object database standards, languages and design
PPTX
IET307 OOP - object oriented programming concepts.pptx
PPTX
Unit - I Intro. to OOP Concepts and Control Structure -OOP and CG (2024 Patte...
PPTX
OOAD unit1 introduction to object orientation
PPTX
Principles of OOPs.pptx
MIT302 Lesson 2_Advanced Database Systems.pptx
Odbms concepts
Advanced Topics on Database - Unit-2 AU17
10-System-ModelingFL22-sketch-19122022-091234am.pptx
Adbms 10 complex object management
Chapter 1 - Concepts for Object Databases.ppt
Object oriented modeling
Advanced DBMS- Unit 1.pdf Advanced DBMS dives into complex data management fo...
DSD Unit 1 Abstract Data Type data structures design notes.pptx
Overview of Object-Oriented Concepts Characteristics by vikas jagtap
OODBMS Concepts - National University of Singapore.pdf
Object oriented database concepts
Getting Started with Entity Framework in .NET
chapterOne.pptxFSdgfqdzwwfagxgghvkjljhcxCZZXvcbx
Object database standards, languages and design
IET307 OOP - object oriented programming concepts.pptx
Unit - I Intro. to OOP Concepts and Control Structure -OOP and CG (2024 Patte...
OOAD unit1 introduction to object orientation
Principles of OOPs.pptx
Ad

Recently uploaded (20)

PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
Essential Infomation Tech presentation.pptx
PPTX
Transform Your Business with a Software ERP System
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
medical staffing services at VALiNTRY
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
System and Network Administration Chapter 2
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PPTX
history of c programming in notes for students .pptx
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
top salesforce developer skills in 2025.pdf
PPTX
L1 - Introduction to python Backend.pptx
PDF
Nekopoi APK 2025 free lastest update
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Softaken Excel to vCard Converter Software.pdf
Understanding Forklifts - TECH EHS Solution
Essential Infomation Tech presentation.pptx
Transform Your Business with a Software ERP System
2025 Textile ERP Trends: SAP, Odoo & Oracle
medical staffing services at VALiNTRY
Reimagine Home Health with the Power of Agentic AI​
System and Network Administration Chapter 2
How to Choose the Right IT Partner for Your Business in Malaysia
history of c programming in notes for students .pptx
Design an Analysis of Algorithms I-SECS-1021-03
Which alternative to Crystal Reports is best for small or large businesses.pdf
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Adobe Illustrator 28.6 Crack My Vision of Vector Design
top salesforce developer skills in 2025.pdf
L1 - Introduction to python Backend.pptx
Nekopoi APK 2025 free lastest update
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool

Concepts for Object Oriented Databases.ppt

  • 1. Chapter 1 Concepts for Object Oriented Databases By: Melaku Y
  • 2. Chapter Outline 1. Overview of O-O Concepts 2. O-O Identity, Object Structure and Type Constructors 3. Encapsulation of Operations, Methods and Persistence 4. Type and Class Hierarchies and Inheritance 2
  • 3. Introduction • Data model is used to describe the structure of the database • Traditional Data Models:  Hierarchical (1960)  Network (since mid-60’s)  Entity-relationship Model  Relational (since 1970 and commercially since 1982) • Object Oriented (OO) Data Models since mid-90’s • Reasons for creation of Object Oriented Databases  Need for more complex applications • Give the designer to specify both the structure of complex objects and the operations  Increased use of object-oriented programming languages • Difficult to integrate with traditional database  Need for additional data modeling features 3
  • 4. 1.1 Overview of Object-Oriented Concepts(1) • As commercial object DBMSs became available, the need for a standard model and language was recognized. • Main Claim: OO databases try to maintain a direct correspondence between:  real-world and database objects so that objects do not lose their integrity and identity and can easily be identified and operated upon • Object: A uniquely identifiable entity  That contains both the attributes that describe the state of a ‘real world’ object and the actions that are associated with it. (Simula 1960s) • Object: has two components:  state (value) and behavior (operations) Similar to program variable in programming language, except that it will typically have a complex data structure as well as specific operations defined by the programmer 4
  • 5. Overview of Object-Oriented Concepts (2) • In OO databases,  objects may have an object structure of arbitrary complexity in order to contain all of the necessary information that describes the object. • In contrast, in traditional database systems,  information about a complex object is often scattered over many relations or records, leading to loss of direct correspondence between a real-world object and its database representation. • Persistent vs transient object  Transient object: exist only during program execution  Persistent object: exist beyond program termination Stored by OO databases permanently in secondary storage  Allow the sharing objects among multiple programs and applications.  What needed: indexing and concurrency(DBMS Features) 5
  • 6. Overview of Object-Oriented Concepts (3) • The internal structure of an object in OOPLs  includes the specification of instance variables, which hold the values that define the internal state of the object. • An instance variable is similar to the concept of an attribute,  except that instance variables may be encapsulated within the object and thus are not necessarily visible to external users • Some OO models insist that  all operations a user can apply to an object must be predefined. This forces a complete encapsulation of objects.  Issues: users required to know attribute name to retrieve specific objects and any simple retrieval requires a predefined operation 6
  • 7. Overview of Object-Oriented Concepts (4) • To encourage encapsulation, an operation is defined in two parts:  signature or interface of the operation, specifies the operation name and arguments (or parameters).  method or body, specifies the implementation of the operation.  Operations can be invoked by  passing a message to an object, which includes the operation name and the parameters.  The object then executes the method for that operation.  This encapsulation permits  modification of the internal structure of an object, as well as  the implementation of its operations, without the need to disturb the external programs that invoke these operations 7
  • 8. Overview of Object-Oriented Concepts (5) • Type and Class hierarchies and Inheritance  permits specification of new types or classes that inherit much of their structure and/or operations from previously defined types or classes.  this makes it easier to develop the data types of a system incrementally and to reuse existing type definitions when creating new types of objects.  Operator overloading(operator polymorphism)  refers to an operation’s ability to be applied to different types of objects  in such a situation, an operation name may refer to several distinct implementations, depending on the type of object it is applied to. 8
  • 9. 1.2 Object Identity, Object Structure, and Type Constructors (1) • Unique Identity:  an OO database system provides a unique identity to each independent object stored in the database.  this unique identity is typically implemented via a unique, system- generated object identifier(OID) the main property of OID immutable (should not change). this preserves the identity of the real- world object being represented. used only once, even if an object is removed from the database, its OID should not be assigned to another object Object may given one or more names meaningful to the user identifies a single object within a database. intended to act as ‘root’ objects that provide entry points into the database. 9
  • 10. Object Identity, Object Structure, and Type Constructors (3) • Type Constructors:  In ODBs, a complex type may be constructed from other types by nesting of type constructors. • The three most basic constructors are:  atom (basic built-in data types)  tuple (compound or composite type) • struct Name<FirstName: string, MiddleInitial: char, LastName: string> • struct CollegeDegree<Major: string, Degree: string, Year: date>  collection (multivalued) => set, array, list, bag, dictionary  The atom constructor is used to represent all basic atomic values  integers, real numbers, character strings, Booleans, other 10
  • 11. Object Identity, Object Structure, and Type Constructors (4) • Tuple constructor  create structured values and objects of the form <a1:i1, a2:i2, … , an:in> • Set constructor  create objects or literals that are a set of distinct elements {i1, i2, … , in}, all of the same type • Bag constructor  Same as set but elements need not be distinct • List constructor  create an ordered list [i1, i2, … , in]  Array constructor  create a single-dimensional array of elements of the same type  Dictionary constructor  creates a collection of key-value pairs (K, V) 11
  • 12. Object Identity, Object Structure, and Type Constructors (5) 12
  • 13. 1.3 Encapsulation of Operations, Persistence of Objects(1) • Encapsulation  One of the main characteristics of OO languages and systems  Related to the concepts of abstract data types and information hiding in programming languages  In traditional database models and systems this concept was not applied  since it is customary to make the structure of database objects visible to users and external programs The relation and its attributes can be accessed using generic operations.  The concept of encapsulation means that  Object contains both data structure and the set of operations used to manipulate it. 13
  • 14. 1.3 Encapsulation of Operations, Methods, and Persistence (2) • The concept of information hiding means that  external aspects of an object is separated from its internal details, which are hidden from the outside world.  The external users of the object are only made aware of the interface (signature) of the operation • Specifying Object Behavior via Class Operations (methods):  The main idea is to define the behavior of a type of object based on the operations that can be externally applied to objects of that type.  In general, the implementation of an operation can be specified in a general-purpose programming language that provides flexibility and power in defining the operations 14
  • 15. Encapsulation of Operations, Methods, and Persistence (4)  For database applications, the requirement that all objects be completely encapsulated is too stringent.  One way of relaxing this requirement is to divide the structure of an object into visible and hidden attributes (instance variables).  An operation is typically applied to an object by using the dot notation. 15
  • 16. 16
  • 17. Encapsulation of Operations, Methods, and Persistence (6) • Specifying Object Persistence via Naming and Reachability:  Transient objects • exist in the executing program and disappear when program terminates.  Persistent objects • stored in the database and persist after program termination. • Mechanisms to make an object persistent  Naming Mechanism: • name can be given to an object via a specific statement or operation in the program • the named objects are used as entry points to the database through which users and applications can start their database access  Reachability Mechanism: • Make the object reachable from some other persistent object. • An object B is said to be reachable from an object A if a sequence of references in the object graph lead from object A to object B. 17
  • 18. Encapsulation of Operations, Methods, and Persistence (6) 18
  • 19. 1.4 Type and Class Hierarchies and Inheritance (1) • Type (class) Hierarchy  A type is defined by  assigning type name and defining attributes (instance variables) and operations (methods). has a type name and a list of visible (public) functions • Specifications: TYPE_NAME: function, function, . . . , function Example: • PERSON: Name, Address, Birthdate, Age, SSN • Subtype:  When the designer or user must create a new type  that is similar but not identical to an already defined type  inherits all the functions of supertype 19
  • 20. Type and Class Hierarchies and Inheritance (3) • Example (1):  PERSON: Name, Address, Birthdate, Age, SSN  EMPLOYEE: Name, Address, Birthdate, Age, SSN, Salary, HireDate, Seniority  STUDENT: Name, Address, Birthdate, Age, SSN, Major, GPA • OR:  EMPLOYEE subtype-of PERSON: Salary, HireDate, Seniority  STUDENT subtype-of PERSON: Major, GPA 20
  • 21. Type and Class Hierarchies and Inheritance (4) • Example (2):  GEOMETRY_OBJECT: Shape, Area, ReferencePoint  RECTANGLE subtype-of GEOMETRY_OBJECT: Width, Height  TRIANGLE subtype-of GEOMETRY_OBJECT: Side1, Side2, Angle  CIRCLE subtype-of GEOMETRY_OBJECT: Radius 21