If you want your database system to store not only data (state) but also the methods/behaviors that operate on that data (e.g., encapsulated procedures with objects), which database paradigm should you choose?

Difficulty: Easy

Correct Answer: Object-oriented

Explanation:


Introduction / Context:
Traditional database models concentrate on storing structured data, while modern applications often need to couple data with behavior. When a system must persist objects that contain both attributes (state) and methods (behavior), choosing the right database model becomes critical for developer productivity, performance, and conceptual alignment with object-oriented programming languages.


Given Data / Assumptions:

  • The requirement explicitly includes methods, not only fields or attributes.
  • The database should support encapsulation and possibly inheritance and polymorphism.
  • We compare among classical models (hierarchical, network), distributed topology (distributed), and an object-oriented model.


Concept / Approach:
An object-oriented database (OODB) stores objects as first-class citizens, including both their data and their methods, aligning database persistence with object-oriented design. In contrast, hierarchical and network databases model parent/child or owner/member relationships but do not persist executable behaviors as part of the data model. A distributed database describes deployment across sites or nodes rather than the logical modeling paradigm of data+behavior.


Step-by-Step Solution:

Identify the core need: persist data together with methods/behavior. Map this requirement to the database paradigm that supports objects as stored entities. Eliminate models that describe structure (hierarchical, network) without behavior encapsulation. Eliminate “distributed,” which is about physical distribution, not object behavior. Select the object-oriented database paradigm.


Verification / Alternative check:
Object-oriented databases (and object-relational extensions) are documented to support persistence of complex types and, in OODB proper, even method definitions or bindings. This directly answers the “include methods” requirement.


Why Other Options Are Wrong:

  • Network/Hierarchical: Emphasize record-link structures; they do not store methods as part of the data model.
  • Distributed: Describes where data lives, not whether methods are persisted with data.
  • None: Incorrect because object-oriented databases fit the requirement.


Common Pitfalls:
Confusing physical distribution with logical modeling; assuming any non-relational model automatically supports methods.


Final Answer:
Object-oriented

Discussion & Comments

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