Within the ODMG model, is an attribute's value always a literal (that is, not an object reference), with object-to-object links represented using relationships rather than object-valued attributes?

Difficulty: Easy

Correct Answer: Applies — ODL attributes hold literal values only

Explanation:


Introduction / Context:
ODMG separates two concepts: literals (values) and objects (with identity). This separation clarifies how to store data in attributes versus how to connect objects to one another. Misunderstanding this distinction leads to muddled schemas and navigation problems.



Given Data / Assumptions:

  • Attributes are defined on classes and store values of literal types (atomic, collection, structured).
  • Relationships define navigable links between objects, often with inverses.
  • Object identity (OID) is managed by the system and is not stored in an attribute as a literal.



Concept / Approach:
Keep attributes for what an object is (values) and relationships for how objects connect. This aligns with ODMG’s strong typing and navigational semantics and prevents leaking identifiers into attribute spaces.



Step-by-Step Solution:
Declare attributes using literal types (e.g., name: string; rating: integer).Declare relationships for object links (e.g., customer–orders) with inverses.Avoid storing OIDs in attributes; use the relationship mechanism.Model multi-valued literals with collection types, not ad hoc concatenated strings.Validate design by ensuring navigation between objects uses relationships, not parsing identifiers.



Verification / Alternative check:
ODMG references show attributes with literal domains and relationships for object links; there is no syntax for declaring an “object-valued attribute.”



Why Other Options Are Wrong:
Option b conflates relationships with attributes. Options c–e impose irrelevant conditions (key, extent, transience) that do not change the attribute-literal rule.



Common Pitfalls:
Embedding foreign identifiers in attributes instead of declaring relationships; using strings to encode references; breaking inverse consistency by not modeling both sides of a link.



Final Answer:
Applies — ODL attributes hold literal values only

Discussion & Comments

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