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

Object-Oriented Database Questions and Answers

11.

A collection of literals or object types is called a bag.

Answer: A

Correct answer: False

The general term for a collection of literals or object types is a collection, and a bag is only one of its kinds - the unordered one that permits duplicates. Sets, lists and dictionaries are equally collections of literals or object types, so naming the general category after one of its members is wrong.

Please log in or register to report this question.

12.

An attribute's value is always literal.

Answer: A

Correct answer: False

An attribute’s value may be a literal or an object identifier, so always literal is too strong. Where the value is an object reference, however, a relationship is generally the better construct, since it is declared in both directions and its integrity is maintained by the system.

Please log in or register to report this question.

13.

An atomic literal is which of the following?

Answer: D

Correct answer: All of the above.

Atomic literals are the indivisible values: the numeric types including long, the character and string types, boolean, and the enumerated types. They are contrasted with collection literals such as set and bag, and with structured literals built from other literals.

Please log in or register to report this question.

14.

The ODMG Object Model supports only unary and binary relationships.

Answer: A

Correct answer: True

Only unary and binary relationships are provided for. Anything of higher degree must be represented by promoting the relationship itself to a class, which is then joined by binary relationships to each participant - the same device the relational model uses for a ternary association.

Please log in or register to report this question.

15.

Database objects are almost always transient.

Answer: B

Correct answer: False

Database objects are almost always persistent - they outlive the program that created them, which is the whole purpose of a database. Transient objects exist only for the duration of a program run, and an object database distinguishes the two explicitly.

Please log in or register to report this question.

16.

Specifying a key ensures that no two objects belonging to a class have the same value for the key attribute(s)

Answer: A

Correct answer: True

That is what a key does, in this model as in the relational one. Declaring a key constrains the extent so that no two of its objects share the same value for the key attribute or combination of attributes - which is why the extent must be declared first.

Please log in or register to report this question.

17.

Identify the class name for the following code: ABC123 course();

Answer: A

Correct answer: ABC123

The declaration follows the usual type-then-name order, so ABC123 is the class and course is the name being declared. The parentheses mark it as an operation rather than an attribute, and ABC123 is then the type it returns.

Please log in or register to report this question.

18.

Literals do not have identifiers, and, therefore, cannot be individually referenced like objects.

Answer: A

Correct answer: True

This is the essential distinction between a literal and an object. An object has an identifier which persists independently of its values, so two objects with identical attribute values remain distinct and either can be referenced. A literal is simply a value: it has no identity, so it can only be embedded within an object rather than pointed at.

Please log in or register to report this question.

19.

The keyword "inverse" is used in which of the following?

Answer: C

Correct answer: Relationship

Because the model requires a relationship to be declared from both ends, each declaration names the corresponding declaration in the other class with the inverse keyword. The database can then keep the two consistent automatically, so adding a link at one end creates it at the other.

Please log in or register to report this question.

20.

You may specify an object identifier with only one unique tag name.

Answer: B

Correct answer: False

ODL permits several tag names for one object identifier, which is useful when the same object is known by different names in different contexts. The identifier itself remains single and unique; it is only the names by which it may be reached that can be multiple.

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