A connection to a database is represented by an instance of the CLOS class
sql:database
. This instance holds information about the connected database. The special variable
sql:
*default-database*
holds the current connection. The database class is subclassed on both vendor and version to provide the right kind of specialized behavior across database facilities: for example, the transaction model or the "brand" of SQL.