29 July 2010

Questions regarding 28 July 2010(1251)

The 28 July 2010 quiz tested your knowledge of a really fantastic Oracle11g feature: the function result cache. First, a few players questioned why we offered a quiz on an Oracle11g topic, when in our assumptions we state that you should assume an Oracle10g Release 2 database instance. That is an assumption. In other words, unless stated otherwise, you assume a 10.2 database. But that doesn't mean we won't offer quizzes regarding a different version of the database (or a Unicode/multibyte character set question or...). If, on the other hand, I offer a quiz that relies on an 11g feature and I do not explicitly state that you are working with Oracle11g, you have every "right" to report that as a mistake in the quiz. We will soon add some text to the Assumptions section to make this more explicit. Second, a few players raised concerns along this line: a result cache function "can return records but not all types of records" (such as a record that has as one of its fields an object type). The quiz question asks "Which of the following types of data can be used in the parameter list or return clause (but not necessarily both) of a function defined using the RESULT_CACHE keyword?" And we scored as correct "Records (user-defined and %ROWTYPE)". I don't believe this requires any change or re-scoring. You can, in fact, use a record type in the return clause of a result cache function. No, you cannot use every single kind of record type, but I did not ask that and I don't think it is reasonable to interpret that this choice means that Oracle will support every type of record structure. Third, a player wrote "Isn't yesterday's quiz is confusing? How to interpret "(but not necessarily both)". What the user has to select in the answer, 1. Can be put in Parameter? 2. Can be returned? How one should interpret?" I am sorry if this construction caused any confusion. I simply wanted to emphasize that a correct answer could be one in which the datatype is support in the parameter list, but not as a return type, or vice versa. I suppose that this clause was unnecessary, since I had already used the OR operator in my sentence. :-) But I would like to think there is no ambiguity there. I look forward to your thoughts. SF

1 comment:

  1. I think it may help to include use-case scenarios with questions like these.

    It can be difficult to answer these correct when you know the restrictions of RESULT_CACHE, but don't know the defined conditions that you're working with, such as the table or record's structure.

    In the answer provided, the scores were based on the table definition you used, but if it used different data types then the answers could have been different. I have the joy of working with LOB columns frequently, so in my experience I've had to avoid using such functionality, and I defaulted to experience with my assumptions.

    Maybe it would help clarify things if you had something like this in the assumptions before the quiz: "Unless otherwise stated, for questions without code examples, assume ideal conditions for successful compilation/execution/use."

    I'm at peace with my mistakes on this one, I just need to double check my assumptions before clicking submit. :)