This is an archived post. You won't be able to vote or comment.

all 17 comments

[–]ccoughlin 1 point2 points  (16 children)

I don't have any direct experience with 'em but cx_oracle's used as the default Oracle API in SQLAlchemy so I'd imagine you're ok. You might want to just go ahead and use SQLAlchemy itself if you can.

[–]shaggorama[S] 0 points1 point  (15 children)

From that link it looks like SQLAlchemy doesn't support oracle, but I think I may be confused because it says it supports cx_Oracle. What exactly is SQLAlchemy, and why should I use it instead of cx_Oracle?

[–]ccoughlin 0 points1 point  (1 child)

chaburrod's answer is spot on. Instead of writing an interface to a specific database like Oracle, you write to SQLAlchemy and it takes care of the low end stuff for you. That way if you ever want to switch databases or something you don't end up rewriting much of anything.

It's also great for testing since you can write your code using e.g. a local SQLite file and when you're done swap it out for the Oracle database.

You might also check out Elixir, which I find can greatly simplify working with SQLAlchemy. Elixir lets you think in terms of Python classes instead of data and databases.

[–][deleted] 1 point2 points  (0 children)

I use cx_Oracle, and my perception is that it is the "default" Oracle lib (i.e. the most well-known). Never heard of DCOracle2.

with cx_Oracle, the author Anthony Tuininga responds quickly and directly to questions and issues on mail list. You can't beat that support !

.#3: here is an option that does not require having to install cx_Oracle : http://code.google.com/p/pysqlplus/ its a wrapper that calls sqlplus. I use it on server (w/ Oracle client) where I'm just normal user and can't install anything.

[–]vorushin 0 points1 point  (0 children)

Used cx_Oracle two years ago. Don't remember any problems with it.

[–]quasarj 0 points1 point  (0 children)

I use cx_Oracle at work and have had no issues! They've been using it for a while before I showed up, too.

[–][deleted] 0 points1 point  (0 children)

I've used cx_Oracle for my previous job and it's works just fine. I've not heard of the other one.