Application Integration & Schema Evolution

Connections, Sessions, and Protocols

A connection is a transport carrying a database protocol; a session is server-side identity and mutable context; a transaction is a bounded atomic history within that session. Correct clients establish, use, reset, and discard each layer deliberately.
  • Transport, protocol, session, and transaction are distinct.
  • Authentication is not authorization.
  • Session state survives transaction boundaries.
  • Protocol phases constrain legal recovery.
  • Cancellation and connection loss have different meanings.
  • Reset is a correctness operation.
Layered lifecycle and failure boundary
State ownership and cleanup
LayerRepresentative stateEnd/reset signal
Transportsocket, TLS keys, livenessclose/discard
Protocolmessage sequence, portals/cursorsresponses drained; driver ready
Sessionprincipal, role, settings, temporary/prepared objectsvendor/driver reset contract
Transactionsnapshot, locks, writes, failed flagCOMMIT or ROLLBACK acknowledged
A defensive checkout contract
acquire(deadline)
  verify connection is live and driver says IDLE
  establish required role, schema, time zone, and statement timeout
  execute work; consume or close every result
finally
  if transaction active/failed: ROLLBACK and verify acknowledgement
  restore session contract; otherwise discard
  return only a known-clean connection