python db-api mappings from database types to python types the db-api standard also specifies set of mappings from the types used in database to the types used in python for full listing see the db-api standard itself but the key mappings includedate(yearmonthdaytime(hourminutesecondtimestamp(yearmonthdayhourminutesecondstring represents database date represents time database value holds database time stamp value used to represent string like database data (such as varcharsgenerating errors the standard also specifies set of exceptions that can be thrown in different situations these are presented below and in the following tablethe above diagram illustrates the inheritance hierarchy for the errors and warning associated with the standard note that the db-api warning and error both extend the exception class from standard pythonhoweverdepending on the specific implementation there may be one or more additional classes in the hierarchy between these classes for examplein the pymysql module there is