Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: ODBC vs Pro*c or OCI
Furkan,
I don't know much about Pro*C but IMO
(correct me if I'm wrong) it is a C preprocessor
which translates SQL statements to OCI calls
(I see nothing which should prevent writing a similar
preprocessor to translate to ODBC instead of OCI).
But I don't think this can refine the performance.
OCI and ODBC are both call level interfaces.
OCI was only tailored for ORACLE while
ODBC is designed as a standard access
to common RDBMS. However
the ODBC "driver" for ORACLE was also
tailored only for ORACLE and performance
depends on how this driver was implemented.
There are two possibilities:
1) Driver resides at the same level as OCI - they
sit on the same layer and call directly Logical Stream Protocol (maybe called different) API. (OCI ::OCIHandleAlloc is called ::SQLAllocHandle in ODBC, but they both implemented equally) In such case the performance is comparable and it would seem better to use ODBC. Unfortunately ORACLE doesn't seem to support ODBC much. 2) Driver resides on the top of OCI - it is an additional layer ( ODBC ::SQLAllocHandle calls OCI ::OCIHandleAlloc ) - it slows performance.
You can check vendors providing
the ODBC drivers for ORACLE and ask them
how they implemented it.
Another pros and cons...
Availability across different platforms:
OCI - available across all OS platforms
ORACLE runs on
ODBC - mainly available for Microsoft's OSes.
In addition it could be found for some UNIX clones.
Learning curve for newcomers:
OCI - ODBC developers have to learn different paradigm
ODBC - ODBC developers can profit from effort they made
to learn other databases. They can also use tools they are accustomed to - MS Query, SQL Trace,...
Under MS OSes ODBC brings additional tools to ORACLE community.
--
Thank you for keeping >anti-spam< habit:
not including my address in your reply.
Received on Tue Jul 20 1999 - 03:44:13 CDT