?
Solved

Pro*C/C++ and PL/SQL

Posted on 2001-07-16
5
Medium Priority
?
1,635 Views
Last Modified: 2007-12-19
After going through oracle documentation, I'm a bit confused.
What is the difference between OCI and SQLLIB. Does SQLLIB uses OCI internally? What are the advatages of Pro*C/C++ over PL/SQL? What exactly is UPI
0
Comment
Question by:prashant_n_mhatre
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 35

Expert Comment

by:Mark Geerlings
ID: 6287623
My understanding is that the main benefits of OCI and Pro*C are for programmers who are already familiar with C or C++, have a C or C++ compiler and want to take advantage of procedures already written in one of those languages.  There may also be some performance advantages to procedures written in C or C++, compared to the same functionality written in a PL\SQL procedure.  C and C++ also have the ability to do some operating system tasks that are difficult or impossible to do directly in PL\SQL.

PL\SQL has the advantage of being relatively easy to use for someone who knows SQL, but doesn't know C or C++ and/or doesn't have a C compiler.
0
 
LVL 5

Expert Comment

by:ser6398
ID: 6287653
What follows are my own personal opinions:

Anytime you want to do serious mathematical computations, pointer operations, massive file operations, specific operating system functionality, or complex datatype manipulation then C++ (or Java) will normally be a better choice than PL/SQL.  This is because C++ and Java have much more power and functionality in these areas than PL/SQL.

If you want to do massive database interaction with little computations or file operations, then PL/SQL will normally be a better choice than C++ or Java, because PL/SQL is built for databases and works very well with databases.
0
 
LVL 4

Author Comment

by:prashant_n_mhatre
ID: 6287738
What about

What is the difference between OCI and SQLLIB. Does SQLLIB uses OCI internally?

0
 
LVL 6

Accepted Solution

by:
jpk041897 earned 280 total points
ID: 6288053
OCI uses embeded SQL code in your C/C++ code via the use of a precompiler that translates SQL*C to Oracle API calls.

SQLLIB is a library, with a class header option for C++ that makes calling Oracle easier.

Both libraries make the same API calls. The only real diffrence is that OCI is better suited for static SQL calls while SQLLIB is better suited for dynamic calls.

I.E.: if your SQL statements will always be exactly the same, then its esier to code with OCI, if you are going to build the SQL calls dynamicaly (via user input for instance), then its easier to code via SQLLIB.

Aa far as performance goes, OCI is slightly faster since the SQL code is pre compiled by the preprocesor whenever possible, whil SQLLIB must rely on prepared statements to obtain the same performance.
0
 
LVL 4

Author Comment

by:prashant_n_mhatre
ID: 6289786
thanks all...
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question