Machine-translated by Google. Questions are authored in English.
Top

Object-Oriented Database Questions and Answers

1.

Using ODL, you can define which of the following?

Answer: D

Correct answer: All of the above.

ODL is a full data definition language for the object model, so a class declaration may carry attributes, the operations that act on them, relationships to other classes, and structured types built from the literal types. That breadth is the point: the schema records behaviour as well as data.

Please log in or register to report this question.

Answer: D

Correct answer: Both directions.

The ODMG model requires each relationship to be declared at both ends, each naming the other through the inverse keyword. The database is then responsible for referential integrity in both directions, so a link cannot exist at one end without existing at the other.

Please log in or register to report this question.

Answer: C

Correct answer: The set of all instances of a class within a database

The extent is the collection the database maintains of every object of a class, and it is what queries range over - the object-oriented counterpart of a table holding the rows of one type. A class need not have an extent, but without one there is nothing for a query to select from and no key may be declared.

Please log in or register to report this question.

Answer: A

Correct answer: To define a range for an attribute.

An enumerated type lists the permitted values, so an attribute declared with it can hold nothing else - a status that must be one of open, held or closed, for instance. The constraint is part of the schema rather than something the application has to enforce.

Please log in or register to report this question.

Answer: A

Correct answer: Similar to SQL and uses a select-from-where structure

OQL keeps the familiar three-clause shape, which is what makes it approachable. What differs is what the clauses may contain: the from clause ranges over extents and over collections reached by path expressions, and the select clause may invoke operations on the objects it returns.

Please log in or register to report this question.

6.

Which of the following is an ordered collection of elements of the same type?

Answer: C

Correct answer: List

A list is ordered and typed: its elements have positions, so the same value may appear more than once and the order is part of the collection’s identity. A set is unordered and rejects duplicates, a bag is unordered but allows them, and a dictionary is a collection of key-value pairs rather than of elements of one type. Ordering is the property that separates the list from all three.

Please log in or register to report this question.

Answer: A

Correct answer: They have the ability to store complex data types on the Web.

This is the genuine strength: object databases handle multimedia, engineering geometry, nested structures and other complex types that map awkwardly onto rows and columns. The other options overstate the case - relational systems remain dominant, and they are the better fit for exactly the two-dimensional tabular applications the third option names.

Please log in or register to report this question.

Answer: B

Correct answer: Manager is a concrete class and a subclass.

The extends keyword makes Manager inherit from Employee, so Manager is the subclass. Nothing in the declaration marks it as abstract, so it is concrete and may have direct instances - which is what one would expect of a class representing actual managers.

Please log in or register to report this question.

9.

The ODMG Object Model requires that a relationship be specified in both directions.

Answer: A

Correct answer: True

A relationship must be declared in both classes, each declaration naming the other as its inverse. This is what allows the system to maintain integrity automatically in both directions, and it is why a relationship in this model is not the one-way reference a programming language pointer would give.

Please log in or register to report this question.

10.

Which of the following is an unordered collection of elements that may contain duplicates?

Answer: B

Correct answer: Bag

A bag is unordered and permits duplicates, which is what distinguishes it from a set. The four collection types divide on exactly these two properties: a set is unordered without duplicates, a bag unordered with them, a list ordered, and a dictionary a collection of key-value pairs.

Please log in or register to report this question.

Loading…
Tags: Object-Oriented Database Questions and Answers || Object-Oriented Database MCQ Questions and Answers || Object-Oriented Database GK Questions and Answers || Object-Oriented Database GK MCQ Questions || Object-Oriented Database Multiple Choice Questions and Answers || Object-Oriented Database GK || GK on Object-Oriented Database || Database Questions and Answers || Database MCQ Questions and Answers || Database GK Questions and Answers || GK on Database