fetch
close()
These methods won't be changed from database to database and same for all databases.
Working with Oracle Database:
From Python Program if we want to communicate with any database,some translator must be
required to translate Python calls into Database specific calls and Database specific calls into
Python [Link] translator is nothing but Driver/Connector.
Diagram
For Oracle database the name of driver needed is cx_Oracle.
cx_Oracle is a Python extension module that enables access to Oracle [Link] can be used for
both Python2 and Python3. It can work with any version of Oracle database like 9,10,11 and 12.
Installing cx_Oracle:
From Normal Command Prompt (But not from Python console)execute the following command
D:\python_classes>pip install cx_Oracle
Collecting cx_Oracle
Downloading cx_Oracle-[Link] (100kB)
100% |-----------| 102kB 256kB/s
Installing collected packages: cx-Oracle
Successfully installed cx-Oracle-6.0.2
How to Test Installation:
From python console execute the following command:
>>> help("modules")
In the output we can see cx_Oracle
....
_multiprocessing crypt ntpath timeit
_opcode csv nturl2path tkinter
_operator csvr numbers token
_osx_support csvw opcode tokenize
_overlapped ctypes operator trace
_pickle curses optparse traceback
_pydecimal custexcept os tracemalloc
_pyio cx_Oracle parser try
_random data pathlib tty
_sha1 datetime pdb turtle
nd
DURGASOFT, # 202, 2 Floor, HUDA Maitrivanam, Ameerpet, Hyderabad - 500038,
4 040 – 64 51 27 86, 80 96 96 96 96, 92 46 21 21 43 | [Link]