python database access in addition to these constructor functionsthe following type objects might be defined the purpose of these codes is to perform type checking against the type_code field of cur descriptionwhich describes the contents of the current result set type object description string character or text data binary data such as blobs numeric data date and time data row id data binary number datetime rowid error handling database modules define top-level exception error that is base class for all other errors the following exceptions are for more specific kinds of database errorsexception description interfaceerror errors related to the database interfacebut not the database itself errors related to the database itself errors related to the processed data for examplebad type conversionsdivision by zeroetc errors related to the operation of the database itself for examplea lost connection error when relational integrity of the database is broken internal error in the database for exampleif stale cursor errors in sql queries error for methods in the database api that aren' supported by the underlying database databaseerror dataerror operationalerror integrityerror internalerror programmingerror notsupportederror modules may also define warning exception that is used by the database module to warn about things such as data truncation during updates multithreading if you are mixing database access with multithreadingthe underlying database module may or may not be thread-safe the following variable is defined in each module to provide more information threadsafety an integer that indicates the thread safety of the module possible values are no thread safety threads may not share any part of the module the module is thread-safebut connections may not be shared the module and connections are thread-safebut cursors may not be shared the moduleconnectionsand cursors are all thread-safe lib fl ff