# Controlling Derby application behavior

This section looks at some advanced Derby application concepts.

- The JDBC connection and transaction model
  Session and transaction capabilities for SQL are handled through JDBC routines, not by SQL commands.
- Result set and cursor mechanisms
  A result set maintains a cursor, which points to its current row of data. It can be used to step through and process the rows one by one.
- Locking, concurrency, and isolation
  This section discusses topics pertinent to multi-user systems, in which concurrency is important.
- Working with multiple connections to a single database
  This section discusses deploying Derby so that many connections can exist to a single database.
- Working with multiple threads sharing a single connection
  JDBC allows you to share a single Connection among multiple threads.
- Working with database threads in an embedded environment
  As a rule, do not use Thread.interrupt() calls to signal possibly waiting threads that are also accessing a database, because Derby may catch the interrupt and close the connection to the database. Use wait and notify calls instead.
- Working with Derby SQLExceptions in an application
  JDBC generates exceptions that are refined subtypes of the type java.sql.SQLException.