ADB ch1 Advanced Database
ADB ch1 Advanced Database
ADB ch1 Advanced Database
Object Orientation
• Object Orientation
• OO Contribution areas
• Programming Languages
• Databases
• Design
• Operating Systems
Evolution of OO Concepts
• OOPLs goals
• OO Attributes
• Multimedia System
• Digital Publication
In addition to the emergence of many advanced database application areas, there were some
drawbacks on the relational database management system.
Horizontal Homogeneity: Each tuple of a relation have same number and type
of attributes
5. Limited operations
7. Impedance mismatch
OO Concepts
• Object is a uniquely identifiable entity that contains both the attributes that describes the
state of the ‘real world’ object and the action that are associated with it.
• Unique identity
• Embedded properties
• Ability to interact with other objects and self
• Unique to object
• Not a primary key (PK is unique only for a relation, PK is selected from attribute
making it dependent on the state)
• Independent of values of attributes ( two objects can have same state but will have
different OID)
• Is invisible to users
• Relationship: embedding the OID of one object into the other ( embed OID for a
branch to employee object)
• Are efficient
• Are fast
• Independent of content
Attributes
• Domain
Object state
Methods
• Can be used to change the state of the object by modifying attribute values
Messages
• Request from one object to the other to activate one of its methods
• Notation: Object.Method
• Eg: StaffObject.updatesalary(slary)
Classes
• Objects with similar attributes and respond to same message are grouped together
BRANCH
Attributes
brabchNo
street
city
postcode
Methods
Print()
getPostCode()
numberofStaff()
Class Hierarchy
• Superclass
• Subclass
Inheritance
• Ability of object to inherit the data structure and behavior of classes above it
Method Overriding
Polymorphism
• Simple
• Composite
• Compound
• Hybrid
• Must be extensible
• Supports encapsulation
• Exhibit inheritance
OID N/A
OODBMS
• Handles a mix of data types (since OODBMS permits new data definition)
• Follows OO rules
• Lack of standards
OODBMS Advantages
• Versioning
• Polymorphism: one operation shared by many objects and each acting differently
• Reusability
OODBMS Disadvantages
• No standard
• No single data model