Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Errata on the review questions of chapter 10 JDBC - Sybex  RSS feed

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • 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: 39054
714
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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
  • 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: 39054
714
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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.
 
He's my best friend. Not yours. Mine. You can have this tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!