0% found this document useful (0 votes)
2 views

Module - 2

The document provides an overview of Object-Oriented Database Management Systems (ODBMS), detailing their structure, components, advantages, and disadvantages compared to traditional relational databases. It explains key concepts such as object structure, classes, and methods, highlighting the benefits of ODBMS in handling complex data types and relationships. Additionally, it discusses the challenges faced by ODBMS, including limited adoption and integration issues, while also outlining when to use ODBMS for optimal performance.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Module - 2

The document provides an overview of Object-Oriented Database Management Systems (ODBMS), detailing their structure, components, advantages, and disadvantages compared to traditional relational databases. It explains key concepts such as object structure, classes, and methods, highlighting the benefits of ODBMS in handling complex data types and relationships. Additionally, it discusses the challenges faced by ODBMS, including limited adoption and integration issues, while also outlining when to use ODBMS for optimal performance.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 69

ADBMS

Dr. Nitish Kumar Ojha


Module - 2 Name of Institution
Definition and Overview of ODBMS Name of Institution

• The ODBMS which is an abbreviation for object-oriented database management


system is the data model in which data is stored in form of objects, which are instances of
classes. These classes and objects together make an object-oriented data model.

• Traditional database applications have data-processing tasks, such as banking and payroll
management, with relatively simple data types that are compatible with the relational data
model. As database systems were applied to a wide range of applications, such as
computer-aided design and geographic information systems, the limitations imposed by
the relational model emerged as a constraint.
Name of Institution

• Components of Object-Oriented Data Model:


The OODBMS is based on three major components, namely: Object structure, Object
classes, and Object identity.

• These are explained below.

• 1. Object Structure:
The structure of an object refers to the properties that an object is made up of. These
properties of an object are referred to as an attribute. Thus, an object is a real-world entity
with certain attributes that makes up the object structure. Also, an object encapsulates the
data code into a single unit which in turn provides data abstraction by hiding the
implementation details from the user.
Name of Institution

• The object structure is further composed of three types of components: Messages, Methods,
and Variables.

• These are explained below.

1. Messages –
A message provides an interface or acts as a communication medium between an object and
the outside world. A message can be of two types:
1. Read-only message: If the invoked method does not change the value of a variable, then
the invoking message is said to be a read-only message.
2. Update message: If the invoked method changes the value of a variable, then the
invoking message is said to be an update message.
Name of Institution

2. Methods –
When a message is passed then the body of code that is executed is known as a
method. Whenever a method is executed, it returns a value as output.

A method can be of two types:


Read-only method: When the value of a variable is not affected by a method,
then it is known as the read-only method.

• Update-method: When the value of a variable change by a method, then it is


known as an update method.
Name of Institution

3. Variables –
It stores the data of an object. The data stored in the variables makes
the object distinguishable from one another.
Name of Institution

3. Object Classes:

An object which is a real-world entity is an instance of a class. Hence


first we need to define a class and then the objects are made which
differ in the values they store but share the same class definition.

The objects in turn correspond to various messages and variables


stored in them.
Name of Institution
Name of Institution

• In the above example, we can see, CLERK is a class that holds the object
variables and messages.
• An OODBMS also supports inheritance in an extensive manner as in a
database there may be many classes with similar methods, variables and
messages. Thus, the concept of the class hierarchy is maintained to depict the
similarities among various classes.
• The concept of encapsulation that is the data or information hiding is also
supported by an object-oriented data model. And this data model also
provides the facility of abstract data types apart from the built-in data types
like char, int, float. ADT’s are the user-defined data types that hold the values
within them and can also have methods attached to them.
Name of Institution

• Thus, OODBMS provides numerous facilities to its users, both


built-in and user-defined.

• It incorporates the properties of an object-oriented data model with


a database management system, and supports the concept of
programming paradigms like classes and objects along with the
support for other concepts like encapsulation, inheritance, and the
user-defined ADT’s (abstract data types).
Name of Institution

• ODBMS stands for Object-Oriented Database Management System, which is a


type of database management system that is designed to store and manage
object-oriented data. Object-oriented data is data that is represented using
objects, which encapsulate data and behavior into a single entity.

• An ODBMS stores and manages data as objects, and provides mechanisms for
querying, manipulating, and retrieving the data. In an ODBMS, the data is
typically stored in the form of classes and objects, which can be related to each
other using inheritance and association relationships.
Name of Institution

• ODBMS have several advantages over traditional relational


databases. One of the main advantages is that they provide a natural
way to represent complex data structures and relationships.

• Since the data is represented using objects, it can be easier to model


real-world entities in the database. Additionally, ODBMS can
provide better performance and scalability for applications that
require a large number of small, complex transactions.
Name of Institution

• However, there are also some disadvantages to using an ODBMS. One of the
main disadvantages is that they can be more complex and harder to use than
traditional relational databases.

• Additionally, ODBMS may not be as widely used and supported as traditional


relational databases, which can make it harder to find expertise and support.

• Finally, some applications may not require the advanced features and
performance provided by an ODBMS, and may be better suited for a simpler
database solution
Name of Institution

• Features of ODBMS:

• Object-oriented data model: ODBMS uses an object-oriented data model to store and
manage data. This allows developers to work with data in a more natural way, as objects are
similar to the objects in the programming language they are using.

• Complex data types: ODBMS supports complex data types such as arrays, lists, sets, and
graphs, allowing developers to store and manage complex data structures in the database.

• Automatic schema management: ODBMS automatically manages the schema of the


database, as the schema is defined by the classes and objects in the application code. This
eliminates the need for a separate schema definition language and simplifies the
development process.
Name of Institution

• High performance: ODBMS can provide high performance,


especially for applications that require complex data access patterns,
as objects can be retrieved with a single query.

• Data integrity: ODBMS provides strong data integrity, as the


relationships between objects are maintained by the database. This
ensures that data remains consistent and correct, even in complex
applications.
Name of Institution

• Concurrency control: ODBMS provides concurrency control mechanisms


that ensure that multiple users can access and modify the same data without
conflicts.

• Scalability: ODBMS can scale horizontally by adding more servers to the


database cluster, allowing it to handle large volumes of data.

• Support for transactions: ODBMS supports transactions, which ensure that


multiple operations on the database are atomic and consistent.
Name of Institution

• Advantages:

• Supports Complex Data Structures: ODBMS is designed to handle complex data


structures, such as inheritance, polymorphism, and encapsulation. This makes it easier to
work with complex data models in an object-oriented programming environment.

• Improved Performance: ODBMS provides improved performance compared to traditional


relational databases for complex data models. ODBMS can reduce the amount of mapping
and translation required between the programming language and the database, which can
improve performance.
Name of Institution

• Reduced Development Time: ODBMS can reduce development time since it eliminates the
need to map objects to tables and allows developers to work directly with objects in the
database.

• Supports Rich Data Types: ODBMS supports rich data types, such as audio, video,
images, and spatial data, which can be challenging to store and retrieve in traditional
relational databases.

• Scalability: ODBMS can scale horizontally and vertically, which means it can handle larger
volumes of data and can support more users.
Name of Institution

• Disadvantages:

• Limited Adoption: ODBMS is not as widely adopted as traditional


relational databases, which means it may be more challenging to find
developers with experience working with ODBMS.

• Lack of Standardization: ODBMS lacks standardization, which


means that different vendors may implement different features and
functionality.
Name of Institution

• Cost: ODBMS can be more expensive than traditional relational


databases since it requires specialized software and hardware.

• Integration with Other Systems: ODBMS can be challenging to


integrate with other systems, such as business intelligence tools and
reporting software.

• Scalability Challenges: ODBMS may face scalability challenges


due to the complexity of the data models it supports, which can
make it challenging to partition data across multiple nodes.
Obstacles in Object-Based Databases Name of Institution

• The first obstacle faced by programmers using the relational data model was
the limited type of system supported by the relational model.

• Complex application domains require correspondingly complex data types,


such as nested records structures, multi-valued attributes, and inheritance
supported by traditional programming languages.

• Such features are indeed supported in ER and extended ER notation, but they
had to be translated into simpler SQL data types.
Name of Institution

• The second obstacle was the difficulty of accessing database data from
programs written in programming languages such as C++ or Java. Simply
expanding the type system supported by the database was not enough to
completely solve this problem.

• The difference between the type system of a database and the type system of a
programming language makes data storage and retrieval more complex, and,
and need to be minimized. Expressing database access using a language other
than a programming language (SQL) again makes the programmer’s job
difficult.
Name of Institution

• Object databases are different from relational databases which are


table-oriented.

• A third type, object–relational databases, is a hybrid of both


approaches. Object databases have been considered since the early
1980s
Name of Institution
Module - 2 Name of Institution
Name of Institution

• An object which is a real-world entity is an


instance of a class.

• Hence first we need to define a class and


then the objects are made which differ in
the values they store but share the same
class definition.

• The objects in turn correspond to various


In the above example, we can see, CLERK is a
messages and variables stored in them.
class that holds the object variables and
messages.
Name of Institution

• The three main building blocks of the OODBMS are object structure, object
classes, and object identity. The following explains them.

• Object Structure: An object's structure refers to the components that make


up the object. An attribute is a term used to describe certain characteristics of
an item.

• A real-world entity with certain qualities that makes up the object structure is
hence referred to as an object. Also, an object contains the data code in a
solitary piece, which in turn creates data abstraction by shielding the user
from the implementation specifics.
Name of Institution

1. Messages - A message operates as a communication channel or as an interface between an entity and the outside world.
There are two sorts of messages:

2. Read-only message: The invoking message is referred to as a read-only message if the called method does not alter the
value of a variable.

3. Update message: The invoking message is referred to as an update message if the invoked method modifies the value of
a variable.

4. Methods: A method is a chunk of code that is executed when a message is given. Every time a method is used, a value is
returned as output. There are two categories of methods:

5. Read-only method: A method is referred to as a read-only method when it has no effect on the value of a variable.

6. Update-method: An update method is one that modifies a variable's value in some way.

7. Variables are used to store an object's data. The variables' data allows the objects to be distinguished from one another.
Name of Institution

• Object-Oriented Database Architecture –

• There are two categories of object-oriented database architecture:

1.Object-oriented database or standalone object-oriented database.

2.Object-relational database.
Name of Institution

• 1) Object-oriented Database
• The object-oriented database or standalone object-oriented database stores data in the form
of objects using the object data model.

• And when object-oriented programming creates a data object, it can be directly stored in the
OODB without needing any conversion or mapping.

• In an object-oriented programming language, we mainly use classes and objects to deal with
data, and an OODB acts as a perfect database to store data created by a program’s classes
and objects.

• This is also one of the main reasons why the object-oriented database is much faster than the
relational database.
Name of Institution

• 2) Object-relational database –

• In an object-relational database, the object data is mapped to the


relational database.

• Here the OODB represents a staging layer for a relational database.


A program or application generally uses object data, and it is not
possible to directly save the same to the relational database, so we
require an object-relational DBMS that converts or maps the object
database to the relational database.
Name of Institution

• What is Object Query Language (OQL)?


• To handle the database, we require an application programming
interface or query language.

• Different database models have different query languages, for


example, the relational database has Structured Query Language
(SQL), and the object-oriented database has
Object Query Language .
• OQL is similar to SQL, but instead of the table, we have objects and
classes in OQL. Select query in QQL:
Name of Institution
Name of Institution

• Advantages of OODB –

• It can manage large and complex data.


• OODB is compatible with all high-level programming languages.
• It is much faster than a relational database.
• Using relational data in a program that is stored in the form of rows and
columns requires more loading process and memory storage, but object data
can be used directly.
• RDBMS uses an API object-relational mapping (ORM) to build its database
schema using object code, but an OODB can do this without using any
interface.
Name of Institution

• Disadvantages OODB –

• It is not much in use, like relational databases.


• Not many programming languages support OODB.
• It does not have a huge community.
• It also has a very high learning curve, which makes it very difficult
for a developer to use this database.
Name of Institution

• RDBMS Vs ODBMS –

• The type of DBMS that is now used the most frequently is a relational database management system
(RDBMS). Most IT workers have a solid understanding of the relational abstraction of rows and columns
accessible via Structured Query Language (SQL).

• Yet, object database systems may be more effective in managing and storing complicated data relationships.
Accessing data with several relationships spread across various tables in an RDBMS might be more
challenging for applications than accessing the same data as an object in an ODBMS.

• In addition, a lot of programmers employ object-oriented programming (OOP) languages to create


applications, including Java, C++, Python, and others. Conversions between complicated objects and rows
from various relational database tables are necessary when using an RDBMS to store and retrieve objects.
Tools for object-relational mapping (ORM) can make this process simpler; nonetheless keep the mapping
overhead in place.
Name of Institution

• When should an ODBMS be used?


• When your business need great performance on complicated data use an ODBMS. But just
what does that mean?

• In a nutshell, you either make money or save money when you satisfy a business
requirement. High performance in the context of an ODBMS refers to the possibility of a
performance increase of ten to a thousand times above that of an RDBMS.

• Finally, if your data resembles a linked graph, like a bill of goods or a schema with several
intersection elements, you can be certain that it contains complicated information. Let's
imagine, for illustration, that you use an automated stock trading program.
Name of Institution

• Examples of applications in production using ODBMS –

• Below are some instances of ODBMSs used in real-world applications:

• British Airlines' Origin and Destination (O&D) Revenue Management System makes use of the Versant
Object Database. The O&D Revenue Management System is employed by British Airways to increase income
from its global route networks and alliances.

• FastObjects are used by bio matrix to store and retrieve sophisticated data from blood tests. Designing,
developing, producing, and marketing diagnosis systems for use in medical and industrial applications are
what bio matrix, a company that specialize in vitro diagnostics, does.

• Siemens' CONDIS system, which maintains network and system infrastructures in real time using object
technology, uses GemStone Smalltalk technology as an object cache and backbone. The Siemens Company
sells the GemStone Smalltalk object cache as a value-added reseller.
Name of Institution

• Types of Models in Object Oriented Modeling –

• Intention of object oriented modeling and design is to learn how to apply object -oriented
concepts to all the stages of the software development life cycle.Object-oriented modeling
and design is a way of thinking about problems using models organized around real world
concepts.
• The fundamental construct is the object, which combines both data structure and behavior.

• Purpose of Models:
1. Testing a physical entity before building it
2. Communication with customers
3. Visualization
4. Reduction of complexity
Name of Institution

• Types of Models:
There are 3 types of models in the object oriented modeling and design are:

• Class Model, State Model, and Interaction Model.

• These are explained as following below –

1. Class Model:
The class model shows all the classes present in the system. The class model shows the
attributes and the behavior associated with the objects. The class diagram is used to show the
class model.The class diagram shows the class name followed by the attributes followed by
the functions or the methods that are associated with the object of the class.Goal in
constructing class model is to capture those concepts from the real world that are important
to an application.
Name of Institution

• State Model:

• State model describes those aspects of objects concerned with time


and the sequencing of operations – events that mark changes, states
that define the context for events, and the organization of events and
states.

• Actions and events in a state diagram become operations on objects


in the class model. State diagram describes the state model.
Name of Institution

• Interaction Model:
• Interaction model is used to show the various interactions between
objects, how the objects collaborate to achieve the behavior of the
system as a whole.

• The following diagrams are used to show the interaction model:


– Use Case Diagram
– Sequence Diagram
– Activity Diagram
Module - 2 Name of Institution
Aggregation Name of Institution

• In Object-Oriented Analysis and Design (OOAD), aggregation


plays an important role in structuring complex systems.

• By encapsulating relationships between objects, aggregation


facilitates modularity, reusability, and maintainability in software
development.
Name of Institution
Name of Institution

• What is Aggregation?

• Aggregation in object-oriented analysis and design (OOAD) refers to a relationship


between objects where one object, known as the "whole," is composed of one or more
other objects, referred to as "parts."

• Unlike composition, aggregation implies a looser coupling between the objects, allowing
the parts to exist independently of the whole.

• This relationship emphasizes the concept of "has-a" rather than "is-a," indicating that the
whole object has or is associated with the parts, but does not own or control them.
• Aggregation is crucial for modeling complex systems and promoting modularity and
flexibility in software design.
Name of Institution
• Importance of Aggregation in OOAD –

• Aggregation holds significant importance in Object-Oriented Analysis and Design (OOAD) for various
reasons:

• Modularity and Reusability: Aggregation allows objects to be composed of other objects, promoting
modular design. This modular approach enhances code reusability as individual components can be reused in
various contexts.

• Flexibility and Scalability: Aggregation provides flexibility by enabling the dynamic assembly of objects at
runtime. This flexibility supports scalability as systems can adapt to changing requirements by adding or
removing components.

• Encapsulation and Information Hiding: Aggregation facilitates encapsulation by hiding the internal details
of complex objects. Objects encapsulated within a whole object can only be accessed through well-defined
interfaces, promoting information hiding and reducing dependencies.
Name of Institution

• Complex System Representation: In complex systems, aggregation helps in accurately


representing relationships between objects. It allows designers to model hierarchical
structures where objects at different levels of abstraction can be connected through
aggregation relationships.

• Maintainability and Extensibility: Aggregation enhances maintainability by promoting a


clear separation of concerns. Changes made to individual components do not necessarily
affect the entire system, making it easier to maintain and extend the software over time.

• Object Collaboration and Communication: Aggregation facilitates object collaboration


and communication within a system. Objects can interact with each other through well-
defined interfaces, enabling the implementation of complex behaviors and functionalities.
Name of Institution
Name of Institution

• UML Notation for Aggregation


• In Unified Modeling Language (UML), aggregation is represented by a hollow diamond
shape on the side of the containing class or object, connected to the contained class or
object by a line.
Name of Institution

• In this notation:
• The hollow diamond (◇) indicates aggregation.
• The line connecting the containing class to the contained class represents the
association between them.
• The containing class is responsible for the lifecycle of the contained class, but
the contained class can exist independently.
• This notation helps to visually represent the "has-a" relationship between
objects, indicating that one object is composed of or contains other objects, but
does not necessarily own or control them.
Name of Institution

• Handling Ownerships and Lifecycles -


• In object-oriented design, handling ownership and lifecycles is crucial, especially when dealing with
aggregation and composition. Here's how ownership and lifecycles are generally managed in both the cases:

• Aggregation

• Ownership: Aggregation implies a weaker form of ownership. The containing object (whole) is responsible
for managing the lifecycle of the contained objects (parts) to some extent, but it does not fully own them. The
contained objects can exist independently and may be shared among multiple containing objects.

• Lifecycles: Since the containing object doesn't fully own the contained objects, their lifecycles can be
independent. The containing object may create or destroy instances of the contained objects, but the contained
objects can also exist outside the scope of the containing object. Therefore, their lifecycles are not tightly
coupled.
Name of Institution

• Best Practices for Aggregation in OOAD -


• Here are some best practices for handling aggregation:

• Clear Understanding of Relationships: Before implementing aggregation, ensure a clear understanding of


the relationships between objects. Determine whether the relationship between the whole and its parts truly
represents a "has-a" relationship, where the whole object contains or is associated with its parts.

• Use Aggregation for Modularity: Employ aggregation to promote modularity and encapsulation. Use it to
break down complex systems into smaller, more manageable components.

• Define Clear Interfaces: Define clear interfaces for interacting with aggregated objects. Encapsulate the
interactions with aggregated objects through well-defined methods and properties. This promotes information
hiding and reduces dependencies between components.
Name of Institution

• Real World example of Aggregation in OOAD


• Let's take an example of a university course enrollment system.
• In this system:
• Course is a class representing individual courses offered by the university.
• Student is a class representing individual students enrolled at the university.

• Now, let's consider the relationship between a Course and the Students enrolled in it:

• Aggregation Relationship: The relationship between a Course and the Students enrolled in it can be
represented using aggregation. A Course "has-a" collection of Students who are enrolled in that course.
• Class Diagram Representation: In a class diagram, the Course class would have an aggregation relationship
with the Student class. The aggregation would be represented by a line with a hollow diamond at the Course
end.
• Implementation: In the software implementation of this system, the Course class would contain a collection
(e.g., a list or array) of Student objects representing the students enrolled in that course.
Name of Institution

• Flexibility and Modularity: Using aggregation allows for flexibility in the system.
Students can be enrolled in multiple courses simultaneously, and the relationship between a
Course and its enrolled Students is not tightly coupled. Each Student object can exist
independently of any specific Course object.

• Example Usage: When a student enrolls in a course, the Student object would be added to
the collection of enrolled students within the corresponding Course object. Conversely,
when a student drops a course, the Student object would be removed from the collection.

• Lifecycle Independence: The lifecycle of Students and Courses can be managed


independently. A Student can exist without being enrolled in any course, and a Course can
exist without having any students enrolled in it.
Name of Institution

• Benefits of Aggregation in OOAD -


• Aggregation offers several benefits in Object-Oriented Analysis and Design (OOAD), contributing to the
creation of flexible, maintainable, and scalable systems:

• Modularity: Aggregation promotes modularity by allowing complex systems to be broken down into
smaller, more manageable components. This modular approach simplifies the design process, making it easier
to understand, maintain, and extend the system over time.

• Reusability: Aggregation facilitates reusability by enabling the reuse of individual components in multiple
contexts. Objects encapsulated within an aggregated relationship can be reused in different parts of the system
without the need for significant modification, leading to reduced development time and effort.

• Flexibility: Aggregation offers flexibility in system design by allowing objects to be dynamically assembled
at runtime. This flexibility enables systems to adapt to changing requirements more easily, as components can
be added, removed, or modified without affecting the overall system architecture.
Name of Institution

• Challenges of Aggregation in OOAD


• While aggregation offers various benefits in Object-Oriented Analysis and Design (OOAD),
it also presents several challenges that need to be addressed for effective implementation:
• Semantic Ambiguity: Determining whether a relationship should be modeled as
aggregation or composition can be challenging. The distinction between the two can
sometimes be ambiguous, leading to misinterpretation and inconsistent modeling.
• Ownership Management: Aggregation implies a weaker form of ownership compared to
composition. Managing ownership relationships and responsibilities between the whole and
its parts can be complex, particularly in systems with multiple levels of aggregation.
• Lifecycle Management: Aggregated objects may have independent lifecycles, posing
challenges in managing their creation, initialization, and destruction. Ensuring proper
lifecycle management while avoiding memory leaks and resource leaks requires careful
attention.
Name of Institution

• Specialization
• Specialization is a top-down approach, and it is opposite to
Generalization. In specialization, one higher level entity can be
broken down into two lower level entities.
• Specialization is used to identify the subset of an entity set that shares
some distinguishing characteristics.
• Normally, the superclass is defined first, the subclass and its related
attributes are defined next, and relationship set are then added.
Name of Institution

• For example: In an Employee management system, EMPLOYEE entity can be specialized as TESTER or
DEVELOPER based on what role they play in the company.
Name of Institution

• What is Specialization in DBMS?


• Specialization basically works with the use of the top-down approach and
leads to an increased size of schema. One can only apply it to one single
entity. In simpler words, Specialization is a process that creates subgroups
within the set of an entity.

• It is just the reverse of the process of Generalization. Basically, Specialization


forms a set of lower-level entities by taking a subset of an entity that is of
high-level. It splits the high-level entity to form multiple sets of low entities.

• This approach may also make use of the process of inheritance.


Name of Institution
What is an Association? Name of Institution

• An association defines a relationship between two entity objects based on


common attributes. The relationship can be one-to-one or one-to-many; you
can use two one-to-many associations to implement a many-to-many
relationship. The association allows entity objects to access the data of other
entity objects through a persistent reference.

• Associations act independently from referential integrity constraints


• Although the same type of relationship can also exist at the table level through
a foreign-key relationship or object REF, an entity object only needs an
association to access the data of another entity object. You can create
associations regardless of whether the database has the corresponding
referential integrity constraints.
Name of Institution

• An example of an association
• An example of a relationship is a one-to-many association
between departments and employees. They might have a
relationship where the Dept entity object has a Deptno
attribute that is related to the Deptno attribute of the Emp entity
object (Dept.Deptno = Emp.Deptno), as shown in the nest
figure.

• The DEPT and EMP tables are at the bottom of the figure, and
the Dept and Emp entity objects are at the top of the figure.
They have a master-detail relationship.
Name of Institution
Name of Institution

• The following figure shows how the association, named


FkDeptnoAssoc, would appear in the JDeveloper Structure pane:

The source end is the Dept entity object (the


master) and the destination end is the Emp
entity object (the detail).
Name of Institution

• Deciding whether to use an association or composition


• First, you need to determine whether two entity objects are related or there is an ownership
relationship. There are two questions you can ask.
• Can Y exist independently of X?
• If Yes, X is associated to Y.
• If No, X is composed of Y.
• For example, can a line item exist independently of an order? The answer is no, so it is a
composition.
• When I delete X, do I also delete the associated Y?
• If Yes, the relationship is a composition.
• If No, the relationship is an association.
• For example, if you delete an employee, do you delete the department? If you delete a
department, do you delete an employee? The answer is no, so it is an association.
Name of Institution
Name of Institution

Module – 2 - Completed

You might also like