• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Errata on the review questions of chapter 10 JDBC - Sybex

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On the kindle version of the OCP JP8 study Guide book, question 18 has A as the answer. (Same in the questions in Sybex)





But the answer is E because the statement was not set to be TYPE_SCROLL_INSENSITIVE or sensitive.
Using conn.createStatement() creates a statement with the default behavior TYPE_FORWARD_ONLY.

image_jdbc.png
[Thumbnail for image_jdbc.png]
image_jdbc2.png
[Thumbnail for image_jdbc2.png]
image_jdbc3.png
[Thumbnail for image_jdbc3.png]
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Omar,
Welcome to CodeRanch!

You are correct. In fact this was already reported (originally here) and is in the errata
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By the way, shouldn't the question explicitly state what indexes the animals have?

The "A" is based on assumption that Anna has the smallest index among other animals, because this query

is identical to this







 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Fedor Chernogorskiy wrote:By the way, shouldn't the question explicitly state what indexes the animals have?


No. Indexes don't exist in the simplified world of the exam.

In the real world, indexes don't change the results of a query like this though; just the speed. The order by clause uses ascending order by default.
 
knowledge is the difference between drudgery and strategic action -- tiny ad
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic