2. Introduction
Object-based databases are a good choice for applications that:
Need to store complex data models
Need to reduce code complexity
Need increased flexibility
Some examples of applications that commonly use object-based databases
include:
1. Engineering applications
2. Financial applications
3. Multimedia applications
4. Content management systems
3. Object-Orientation
1. It is a kind of thinking methodology
Everything in the world is an object;
Any system is composed of objects (certainly a system is also an
object);
The evolution and development of a system is caused by the
interactions among the objects inside or outside the system
4. Everything in the world is an object
1. A flower, a tree, an animal
2. A student, a professor
3. A desk, a chair, a classroom, a building
4. A university, a city, a country
5. The world, the universe
6. A customer
7. A dog, cat, lion
8. A subject such as Advanced Database, Math, History, …
5. So … What is an Object?
A “thing” that has identity, state, and behavior
• identity: is a distinct “instance” of a class of objects
• state/attributes has a set of properties (aka fields)
each field can have different values
• behavior: has “methods” (things that the object knows how
to do)
we say we “call” a method on the object
6. The development of a system is caused by
the interactions
Isabela State University is developed by the interactions among:
students
professors
Staffs
officers of Cabagan
officers of Tuguegaro
…..
Inside ISU
Outside ISU
7. Benefits of using objects in databases
Improved data modeling
logical order, so it's easier to find what you need
Reduced code complexity
work faster, find and fix problems easily, and make the software run
smoothly.
Increased flexibility
change and adapt your database without too much trouble
8. Key features of object-based databases
1. Objects - Object-based databases store data in the form of objects. Objects are self-
contained entities that contain both data and behavior.
Inheritance
Allows you to create new classes that are based on existing classes.
- Create table hierarchies
Encapsulation
Allows you to treat objects of different types as if they were the same type.
- Used to implement different behaviors for different types of data in a
database.
Polymorphism
The process of hiding the internal implementation of an object from the
outside world.
- Used to hide the internal implementation of database tables and columns
from the outside world
- access control lists (ACLs) and views.
9. Objects in database concepts
Objects are the basic building blocks of object-oriented databases, and
they are used to model real-world entities such as customers, products,
and orders.
Objects have the following properties:
Identity: Each object has a unique identity that distinguishes it from other objects.
State: An object's state is represented by the values of its attributes.
Behavior: An object's behavior is defined by its methods.
10. Inheritance Concepts
Inheritance - Parent-Child Relationship, Reuse Code, Subclass,
Superclass, Extending, Derived Class.
This allows you to reuse code and create more complex data models.
In layman terms, consider a family tree for code. It allows one
"class" (a blueprint for an object) to inherit the properties and
behaviors of another class.
The act of passing down traits from parents to children. For
example, a child might inherit the eye color of one parent and
the hair color of the other parent.
11. Inheritance Concepts
In database concepts, inheritance is a way to create new tables based on
existing tables. It allows you to reuse the schema and data of existing
tables, and to add new columns and data as needed.
Inheritance is similar to object-oriented inheritance, but it is applied to
tables in a relational database.
An existing table, you use the CREATE TABLE ... INHERITS
(parent_table)
13. An illustration of objects database concept
Identity
• Name: Alador
• Microchip number: 1234567890
• DNA profile: A unique string of DNA that identifies alador as an individual dog
State
• Breed: Labrador Retriever
• Size: Medium
• Color: Yellow
• Age: 2 years
• Weight: 50 pounds
Behavior
• Walks, runs, jumps, barks, wags its tail
•Dogs
• PurebredDogs
• LabradorRetrievers
14. Answer the following given objects by identifying
the identity, state, and behavior:
LightBulb
Car
BankAccount