represent an sql statement submitted as string and can be used to access and step through sql statement results query results of sql select statements are returned to scripts as python sequences of sequences ( list of tuples)representing database tables of rows within these row sequencescolumn field values are normal python objects such as stringsintegersand floats ( [('bob' )('emily', )]column values may also be special types that encapsulate things such as date and timeand database null values are returned as the python none object beyond thisthe api defines standard set of database exception typesspecial database type object constructorsand informational top-level calls including thread safety and replacement style checks for instanceto establish database connection under the python api-compliant oracle interfaceinstall the commonly used python oracle extension module as well as oracle itselfand then run statement of this formconnobj connect("user/password@system"this call' arguments may vary per database and vendor ( some may require network details or local file' name)but they generally contain what you provide to log in to your database system once you have connection objectthere variety of things you can do with itincludingconnobj close(connobj commit(connobj rollback(close connection now (not at object __del__ timecommit any pending transactions to the database roll database back to start of pending transactions but one of the most useful things to do with connection object is to generate cursor objectcursobj connobj cursor(return new cursor object for running sql cursor objects have set of methodstoo ( close to close the cursor before its destructor runsand callproc to call stored procedure)but the most important may be this onecursobj execute(sqlstring [parameters]run sql query or command string parameters are passed in as sequence or mapping of valuesand are substituted into the sql statement string according to the interface module' replacement target conventions the execute method can be used to run variety of sql statement stringsddl definition statements ( create tabledml modification statements ( update or insertdql query statements ( selectsql database interfaces