Do literals in the ODMG Object Model lack identifiers (object identity), and therefore cannot be individually referenced the way objects with OIDs can?

Difficulty: Easy

Correct Answer: Applies — literals have no identity and cannot be referenced like objects

Explanation:


Introduction / Context:
ODMG distinguishes objects (which possess identity independent of state) from literals (which are pure values). This distinction informs how we model attributes, relationships, persistence, and navigation. The question tests whether literals can be individually referenced like objects.



Given Data / Assumptions:

  • Objects have object identifiers (OIDs) enabling references and identity-based equality.
  • Literals are compared by value and are not addressable via identity.
  • Attributes store literals; relationships connect objects.



Concept / Approach:
Because literals lack identity, they cannot be the target of identity-based references. Two equal literals are interchangeable. Conversely, two distinct objects with equal state remain distinguishable because of identity — crucial for persistence, locking, and referential integrity.



Step-by-Step Solution:
Define objects with OIDs to represent entities that must be tracked individually.Use attributes to store literal data describing those objects.Declare relationships for object-to-object references, never literal-to-object.Rely on value comparison for literals; rely on identity for objects.Design queries and navigation assuming literals are not individually addressable.



Verification / Alternative check:
In examples, you never see a literal being “referenced” or updated by identity. Literals appear as values inside objects or collections; objects are the units of identity and persistence.



Why Other Options Are Wrong:
System-assigned identifiers for literals (option b) do not exist in ODMG. Options c–e add irrelevant conditions; the lack of identity applies universally to literals.



Common Pitfalls:
Attempting to give business identity to a literal rather than lifting it to an object; storing OIDs as attribute values; misunderstanding equality semantics in collections of objects versus collections of literals.



Final Answer:
Applies — literals have no identity and cannot be referenced like objects

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion