[erlang-questions] Multiple db connection drivers

Tim Watson <>
Fri Feb 17 23:46:03 CET 2012


On 17 February 2012 15:13, Garrett Smith <> wrote:

> Hi Erisa,
> Erlang has so many amazing features and benefits, it's hard to keep track!
>
> Database interfaces, however, is not on that list :)
>
>
+1 - this is most annoying. We have a custom OCI based Oracle driver at
work which is lightning fast, but I'm not allowed to 'replicate' so I
decided to write it from scratch but haven't had the time to get properly
started. As soon as I began, I thought to myself  'what should the API look
like' and kind of despaired that there isn't an equivalent to
JDBC/ADO.NETthat I could just conform to.


> That's a broad, sweeping statement that leaves me open to easy
> criticism! But I think if you're coming from a Java or .NET
> background, it's hard to not scratch your head at the state of the
> available libraries.
>
>
The pgsql libraries mentioned are actually very good and the built in ODBC
works fine if you can live with it. I'm pretty sure I've heard (on this
list) that people have used it successfully in production for years without
issue. Like I said we've got a fabulous Oracle/OCI driver that's not once
died in production for the last three years, but I'm now thinking that any
rewrite would be better off done once the NIF/Native-Process changes come
in.


> Keep in mind that Erlang does not have a tradition of "ORMs" the way
> Java, Ruby, Python, etc. do. You'll need to dive into the details of
> whatever data stores you end up working with. I personally think this
> is a benefit, but it does take more energy up front to consider your
> requirements and learn the technology.
>
>
There is ORM-like stuff in Erlyweb and Chicago Boss. Personally I think
ORMs are pants and avoid them like the plague regardless of the language
I'm using, but that's just me. Anyway, I'm not sure what the 'O' part would
mean in Erlang, as a mapping from db rows to tuples/lists is probably just
fine for most jobs.

I'd also suggest that the OP take a look at the source code for zotonic,
which does some interesting things with a fairly low level data model
backed by postgres (not much unlike the schema our oracle driver is
hitting) and works very well.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120217/48f91f77/attachment.html>


More information about the erlang-questions mailing list