Chapter 1: Concepts for Object Databases
45 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is the purpose of the unique persistent name assigned to an object?

  • To enhance the performance of the object during operations.
  • To determine the size of the object in memory.
  • To restrict access to the object from external operations.
  • To allow retrieval of the object by other programs. (correct)
  • Which operation is NOT part of the Project class defined?

  • assign_Emp
  • create_Project
  • remove_Emp
  • update_Project (correct)
  • What defines the reachability of an object B from object A?

  • A sequence of references in the object graph leading from A to B. (correct)
  • The ability to directly access object B without any references.
  • The absence of any references leading from A to B.
  • The assignment of a unique name to both objects A and B.
  • In the object-oriented approach, what does a class declaration specify?

    <p>The type and operations for a class of objects.</p> Signup and view all the answers

    What is assumed about objects in traditional database models?

    <p>They are always assumed to be persistent.</p> Signup and view all the answers

    What type of object is represented by 'o7' in the example?

    <p>Set</p> Signup and view all the answers

    Which of the following objects includes attributes such as DNAME and DNUMBER?

    <p>o8</p> Signup and view all the answers

    Which of the following correctly describes the first six objects (o1 to o6) listed in the example?

    <p>They represent atomic values.</p> Signup and view all the answers

    What does 'i1', 'i2', 'i3', etc., stand for in the example?

    <p>Unique system-generated object identifiers</p> Signup and view all the answers

    What kind of relationship does object 'o7' illustrate?

    <p>Set membership</p> Signup and view all the answers

    Which option correctly defines the term 'tuple' as used in the examples?

    <p>An ordered collection of values potentially of different types</p> Signup and view all the answers

    How many objects are specifically mentioned as tuples in the examples?

    <p>Two</p> Signup and view all the answers

    What concept is illustrated by comparing object states for equality in the second example?

    <p>Object identity and equality</p> Signup and view all the answers

    What does encapsulation in object-oriented programming allow for?

    <p>Modification of internal structure without affecting external programs.</p> Signup and view all the answers

    Why is it essential to retain old versions of objects in certain applications?

    <p>To ensure continuity until new versions are tested and verified.</p> Signup and view all the answers

    What is operator polymorphism also known as?

    <p>Operator overloading.</p> Signup and view all the answers

    What property must a unique object identifier (OID) possess?

    <p>It must remain unchanged for the lifetime of the object.</p> Signup and view all the answers

    Which of the following is NOT a basic type constructor in object-oriented databases?

    <p>Graph.</p> Signup and view all the answers

    What is the primary function of the atom constructor?

    <p>To represent basic atomic values.</p> Signup and view all the answers

    What does the concept of unique identity in an OO database ensure?

    <p>Every object stored has a distinct, system-generated identifier.</p> Signup and view all the answers

    What type of programming concept does operator overloading enhance?

    <p>Flexibility in operations based on object types.</p> Signup and view all the answers

    What was a primary reason for the creation of Object-Oriented (OO) databases?

    <p>Need for more complex applications</p> Signup and view all the answers

    Which of the following languages contributed to the development of Object-Oriented models?

    <p>Java</p> Signup and view all the answers

    What is one characteristic of OO databases?

    <p>They maintain a direct correspondence between real-world and database objects.</p> Signup and view all the answers

    Which of the following was NOT a commercial OO database product mentioned?

    <p>Oracle</p> Signup and view all the answers

    What commonality exists among the historical OO systems mentioned?

    <p>They were primarily experimental systems.</p> Signup and view all the answers

    Which OO database system has a known connection to Fujitsu?

    <p>Jasmine</p> Signup and view all the answers

    Which of the following is a key feature of Object-Oriented database models?

    <p>They encapsulate operations and methods.</p> Signup and view all the answers

    What does the term OO identity refer to in Object-Oriented databases?

    <p>The assignment of a unique identifier to each object.</p> Signup and view all the answers

    What distinguishes objects o1 and o2 from o3, despite similar states?

    <p>They have different object identities (OIDs).</p> Signup and view all the answers

    Which statement correctly describes the relationship between objects o4 and o5?

    <p>They are equal but not identical due to distinct OIDs.</p> Signup and view all the answers

    What concept is encapsulation most closely associated with in programming?

    <p>Information hiding.</p> Signup and view all the answers

    How can the behavior of a type of object be defined according to class operations?

    <p>By outlining the allowed external operations.</p> Signup and view all the answers

    In the context of object behavior, what is a method of relaxing complete encapsulation for database applications?

    <p>Dividing object structure into visible and hidden attributes.</p> Signup and view all the answers

    What does having an object's state refer to in object-oriented concepts?

    <p>The values of its attributes at a given moment.</p> Signup and view all the answers

    Which aspect is NOT a characteristic of encapsulation in object-oriented programming?

    <p>Revealing all methods and properties to users.</p> Signup and view all the answers

    What does the abbreviation OID stand for in the context of object identity?

    <p>Object Identifier.</p> Signup and view all the answers

    What characterizes a persistent collection in object-oriented databases?

    <p>It permanently stores a collection of objects.</p> Signup and view all the answers

    What is the primary difference between a transient collection and a persistent collection?

    <p>Transient collections do not retain data after program termination.</p> Signup and view all the answers

    How does polymorphism apply in object-oriented programming?

    <p>It permits the same operator to have different implementations based on object types.</p> Signup and view all the answers

    What is an example of multiple inheritance in a type hierarchy?

    <p>A subtype, such as ENGINEERING_MANAGER, that inherits from both MANAGER and ENGINEER.</p> Signup and view all the answers

    What does the term 'configuration' refer to in object-oriented databases?

    <p>An arrangement of versioned modules that form a compatible complex object.</p> Signup and view all the answers

    What is a key challenge currently facing the object-oriented database market?

    <p>Slow growth and limited explicit use of OODB platforms.</p> Signup and view all the answers

    Which conceptual feature allows the same operator to be applied differently based on the object type?

    <p>Operator Overloading</p> Signup and view all the answers

    Which statement about versions in object-oriented databases is correct?

    <p>Multiple versions of the same object are often required in applications.</p> Signup and view all the answers

    Study Notes

    Chapter 1: Concepts for Object Databases

    • Object databases aim to directly map real-world objects to database objects, ensuring integrity and easily identifiable objects.
    • Traditional data models include hierarchical, network, and relational models.
    • Object-oriented data models emerged in the mid-1990s. They addressed needs for more complex applications and data modeling features, prompted by increased object-oriented programming language usage.
    • Commercial OO databases, though present in the 1990s, didn't significantly impact mainstream data management.

    Chapter Outline

    • Overview of Object-Oriented Concepts
    • Object Identity, Object Structure, and Type Constructors
    • Encapsulation of Operations, Methods, and Persistence
    • Type and Class Hierarchies and Inheritance
    • Other Object-Oriented Concepts
    • Current Status

    History of OO Models and Systems

    • Languages include Simula (1960s), Smalltalk (1970s), C++ (late 1980s), and Java (1990s and 2000s).
    • Experimental systems include Orion at MCC, IRIS at HP labs, Open-OODB at TI, ODE at ATT Bell labs, Postgres-Montage-Illustra at UCB, and Encore/Observer at Brown.
    • Commercial OO database products include Ontos, Gemstone, O2, Objectivity, Objectstore, Versant, Poet, and Jasmine (Fujitsu-GM).

    1 Overview of Object-Oriented Concepts (1)

    • OO databases try to maintain a direct correspondence between real-world and database objects.
    • Objects consist of state (value) and behavior (operations).
    • Objects are similar to program variables in programming languages but typically combine complex data structures with defined programmer-specified operations.

    1 Overview of Object-Oriented Concepts (2)

    • OO database objects have structures of varying complexity, storing all needed descriptive information.
    • Traditional databases often disperse object information through multiple relations or records, leading to a loss of direct correspondence between the real-world object and its representation.

    1 Overview of Object-Oriented Concepts (3)

    • Object internal structure specifies instance variables; these hold the values defining the object's internal state.
    • Instance variables are like attributes but might be encapsulated within the object (not directly visible externally).

    1 Overview of Object-Oriented Concepts (4)

    • Some OO models require predefined operations applicable to objects, enforcing complete encapsulation.
    • Operations are defined through a signature (interface), specifying operation name and parameters, and a method (body), detailing the implementation.

    1 Overview of Object-Oriented Concepts (5)

    • Operations on objects invoke methods by passing messages including an operation name and parameters.
    • Encapsulation allows internal object/operation modifications without affecting external calling programs.

    1 Overview of Object-Oriented Concepts (6)

    • Some OO systems offer multiple versions of objects, crucial in design & engineering applications.
    • Old, verified object versions are retained until new versions are tested and validated.
    • This is critical for designs in manufacturing control, architecture, and software systems.

    1 Overview of Object-Oriented Concepts (7)

    • Operator polymorphism allows applying an operation to different object types with various implementations.
    • Another name for this feature is operator overloading.

    2 Object Identity, Object Structure, and Type Constructors (1)

    • OO databases uniquely identify each object through a unique system-generated object identifier, or OID.
    • The OID never changes (immutable) preserving the identity of the real-world object represented.

    2 Object Identity, Object Structure, and Type Constructors (2)

    • Object states (current values) in OO databases are constructed from other objects or values using type constructors.
    • Basic constructors include atom, tuple, and set; also, list, bag, and array are commonly used.
    • Atoms represent basic values like integers, reals, strings, Booleans, and other types directly supported by the system.

    2 Object Identity, Object Structure, and Type Constructors (3)

    • Example 1 demonstrates a potential relational database state corresponding to the COMPANY schema, including attributes for employees/dependents, departments and locations, projects, and works_on relations.

    2 Object Identity, Object Structure, and Type Constructors (4)

    • Detailed relation schemas for DEPARTMENT, WORKS_ON, PROJECT, and DEPENDENT tables are provided
    • Example data is included, showcasing structure and data values.

    2 Object Identity, Object Structure, and Type Constructors (5)

    • Example 1 (continued) provides a table listing dependent information

    2 Object Identity, Object Structure, and Type Constructors (6)

    • Example 1 (continued) gives examples of object representations in terms of unique system-generated identifiers as atoms (Houston), tuples (<dname:i5, dnumber:i4, mgr:i9>) and sets (<dname:i5, dnumber:i4, mgr:i9>,{i1, i2, i3}).

    2 Object Identity, Object Structure, and Type Constructors (7)

    • Example 1 continued - further examples of object representations, specifically focusing on complex objects as tuples with nested structures.
    • A detailed explanation of various objects represented as tuples and how these relate in complex data structures.

    2 Object Identity, Object Structure, and Type Constructors (8)

    • The initial six objects in example 1 represent atomic values.
    • Object seven represents a set of locations for a particular department (5), containing Houston, Bellaire, and Sugarland.
    • Object eight represents the department itself, incorporating attributes like DNAME, DNUMBER, MGR, and LOCATIONS.

    2 Object Identity, Object Structure, and Type Constructors (9)

    • Example 2 contrasts the comparison and the equality of object states (tuples) to illustrate the difference between their identities and equality at atomic level.
    • Example tuples o1, o2, o3 with details of atomic values a1,a2 are given.

    2 Object Identity, Object Structure, and Type Constructors (10)

    • Example 2 (continued) - describes comparisons of object states focusing on their internal atomic values and the way these represent values in comparison to their unique object identifier.
    • Explanation of how objects with the same state but different unique identifiers (OIDs) cannot be considered equal.

    Object Identity, Object Structure, and Type Constructors (12)

    • Defines types EMPLOYEE and DEPARTMENT as tuples, outlining attributes and data types for each.

    3 Encapsulation of Operations, Methods, and Persistence (1)

    • Encapsulation is a key feature of object-oriented languages, related to abstract data types and information hiding in programming languages.

    3 Encapsulation of Operations, Methods, and Persistence (2)

    • Defining object behavior involves defining operations applicable to objects of a particular type. This is typically done using a general-purpose programming language for defining the operations.

    3 Encapsulation of Operations, Methods, and Persistence (3)

    • In database applications, complete encapsulation requirements are often relaxed by dividing object structure into visible/hidden attributes.

    3 Encapsulation of Operations, Methods, and Persistence (4)

    • Detailed definition examples of the EMPLOYEE and DEPARTMENT classes showcasing their operations, attributes and data types for the classes.

    3 Encapsulation of Operations, Methods, and Persistence (5)

    • Naming Mechanism: objects are assigned a unique name for retrieval by other programs.

    3 Encapsulation of Operations, Methods, and Persistence (6)

    • Persistent object collections reside permanently in the database for shared access across multiple programs.
    • Transient collections are temporary and disappear when the program terminates.

    3 Encapsulation of Operations, Methods, and Persistence (7)

    • Detailed definition of the DEPARTMENT_SET class, describing its type, operations (add_dept, remove_dept), and creating and destroying the object

    4 Type and Class Hierarchies and Inheritance (1)

    • Type hierarchy is created by assigning a type name and listing its public functions for operations. An example is provided about PERSON type.

    4 Type and Class Hierarchies and Inheritance (2)

    • Subtype creation - creating a new type similar to an existing type, but not identical.
    • Supertype inheritance - the new subtype inherits functions from the supertype.

    4 Type and Class Hierarchies and Inheritance (3)

    • Examples including PERSON, EMPLOYEE, and STUDENT types showcase inheritance relationships within a type hierarchy.

    4 Type and Class Hierarchies and Inheritance (4)

    • Example 2 outlines a GEOMETRY_OBJECT type with subtypes RECTANGLE, TRIANGLE, and CIRCLE, demonstrating how subtypes inherit attributes from the supertype and specify subtypes using conditions.

    4 Type and Class Hierarchies and Inheritance (5)

    • An alternative, conditonal method for specifying subtypes. Describes how to specify subtypes using a condition on a defining attribute, like shape, to define subclasses.

    4 Type and Class Hierarchies and Inheritance (6)

    • Extents are defined as collections of objects of the same type.
    • Persistent collections contain objects stored permanently in the database.
    • Transient collections exist only during program execution.

    5 Other Object-Oriented Concepts (1)

    • Polymorphism allows using the same operator with different implementations based on the data types.
    • Examples of polymorphism in general programming contexts, such as addition with integers and string concatenation are given.

    5 Other Object-Oriented Concepts (2)

    • Multiple inheritance enables a subtype to inherit from multiple supertypes, combining their functionalities.
    • An example of this concept (ENGINEERING_MANAGER subtype inheriting functionalities from both MANAGER and ENGINEER classes) is given, showing how inheritance forms a type lattice rather than a strictly hierarchical structure.

    5 Other Object-Oriented Concepts (3)

    • Database applications frequently require different versions of objects.
    • Configuration in this context is a collection of versions of modules arranged to create a valid version of the complex object.

    6 Current Status

    • OODB market growth is slow, but OO concepts are widely adopted in applications, often without direct use of OODB platforms for data storage
    • OO tools for modeling and analysis and OO programming languages like Java and C++ are now widely used in application design.
    • Object relational database management systems (ORDBMS) provide a compromise between the extensibility of OO approaches and the maturity of relational approaches. Databases like Informix Universal Server, Oracle 10i, and IBM's UDB/DB2/II are examples.

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Related Documents

    Description

    Explore the core concepts of object databases in this quiz. From object identity and structure to encapsulation and type hierarchies, this chapter provides a comprehensive overview of object-oriented data models and their evolution over time. Test your understanding of key principles and historical context surrounding object databases.

    More Like This

    Final Year Higher Secondary Computer Science Quiz
    5 questions
    Object-Oriented Databases Fundamentals
    12 questions
    BD del apunte, preguntas
    30 questions
    Computer Science Fundamentals
    10 questions
    Use Quizgecko on...
    Browser
    Browser