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

Object-Oriented Database Questions and Answers

21.

The Object Model supports different literal types, but does not support atomic literals, collection literals, and structured literals.

Answer: B

Correct answer: False

The model supports all three kinds. Atomic literals are the indivisible values such as long and boolean; collection literals are sets, bags, lists and dictionaries; and structured literals are records built from other literals. The statement denies exactly the three categories the model defines.

Please log in or register to report this question.

Answer: D

Correct answer: All of the above.

OQL provides select for a filtered subset, select distinct for a collection without duplicates, and a plain selection that returns everything including duplicates. The parallel with SQL is deliberate, so that a query language familiar from the relational world carries over to objects.

Please log in or register to report this question.

23.

An attribute's value is either a literal or an object identifier.

Answer: A

Correct answer: True

An attribute may hold a literal value or an object identifier referring to another object. The model does not forbid the second, though where a genuine association between two classes is meant, a relationship is the better construct because the system then maintains it in both directions.

Please log in or register to report this question.

24.

In ODL, you specify an operation using parentheses after its name.

Answer: A

Correct answer: True

The parentheses are what distinguish an operation from an attribute in a class declaration, and they hold the parameter list when there is one. ODL declares only the signature; the implementation is written in the host programming language.

Please log in or register to report this question.

Answer: D

Correct answer: All of the above.

ODL does all three. It is the data definition language of the ODMG model, it is used to write the logical schema, and since it is directly executable by an object database it is also the means by which that schema is implemented - which is what removes the translation step the relational world needs.

Please log in or register to report this question.

26.

An ordered collection of elements of the same type are called sets.

Answer: B

Correct answer: False

An ordered collection of elements of the same type is a list. A set is unordered and holds no duplicates. The four collection types are separated by exactly these two properties, order and the admission of duplicates, and confusing two of them is the standard trap in this material.

Please log in or register to report this question.

27.

ODL supports which of the following types of association relationships?

Answer: B

Correct answer: Unary and Binary

The ODMG object model provides for relationships between two classes and for a class related to itself, and no further. A ternary relationship must be modelled by introducing a class of its own to stand for the association, exactly as an associative entity is used in the relational model.

Please log in or register to report this question.

28.

If you know all the possible values that an attribute can have, you can enumerate those values in ODL.

Answer: A

Correct answer: True

An enumerated type does exactly this: the permitted values are listed in the schema, and the attribute can hold none but those. It documents the intent and enforces the constraint at the same time, without any code in the application.

Please log in or register to report this question.

29.

ODL supports the abstract keyword for classes and operations.

Answer: B

Correct answer: False

ODL has no abstract keyword. Abstract classes are represented in the model by other means, but the language does not provide a modifier for them - nor for operations, which are declared with their signature and implemented elsewhere in any case.

Please log in or register to report this question.

30.

Before specifying a key for a class, you must specify its extent.

Answer: A

Correct answer: True

A key constrains the objects within an extent, so the extent must exist before there is anything for the key to be unique across. A class declared without an extent can therefore carry no key - and cannot be the target of an OQL query either, for the same underlying reason.

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