PL/SQL Nested Tables - Quiz Expalanation
The correct answers are indicated below, along with text that explains the correct answers.
1.
What is the difference between an object type and an object?
Please select the best answer.
A.
There is no difference.
B.
An object type has data associated with it, whereas objects can be used as building blocks for other objects and tables.
C.
An object type can be used as a building block for other objects and tables, whereas objects have data associated with them.
D.
Objects are persistent, object types are not.
Answer C is correct
, because object types are indeed the building blocks for object tables and other objects. Answer A is incorrect because object and object types are different. Answer B is incorrect because objects are associated with data, whereas object types are not. Answer D is incorrect because both objects and object types are persistent within the database.
2.
l What are the limitations with the relational approach that are resolved by the object-relational approach?
Please select the best answer.
A.
The limitations include objects, object types, attributes, and methods.
B.
There are no limitations with the relational approach.
C.
The limitations exist in the definition of objects.
D.
The limitations that are resolved in the object-relational approach include representing encapsulation, composition, aggregation, and inheritance.
Answer D is correct
because the object-relational approach is based on the object-oriented paradigm; hence, this approach can effectively represent encapsulation, composition, aggregation, and inheritance. Answer A is incorrect because the limitations represented are objects, not limitations.Answer B is incorrect because there are limitations with the relational approach. The definition of objects is not a limitation, so answer C is incorrect.
3.
l What are the two types of collections?
Please select the best answer.
A.
Objects and object types.
B.
Varrays and nested tables.
C.
Tables and columns.
D.
Oracle8i does not support collections.
Answer B is correct.
The collection types available within Oracle8i include varrays and nested tables, so answer B is correct.
Answer A is incorrect because objects and object types are not collections. Because tables and columns are also not collections, answer C is incorrect. Answer D is incorrect because Oracle8I indeed supports collections.