Re: platform independent set-up

From: Jason Tan <jason(at)rebel(dot)rebel(dot)net(dot)au>
To: jeroen(dot)van(dot)rest(at)philips(dot)com
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: platform independent set-up
Date: 2001-09-17 02:27:08
Message-ID: Pine.LNX.3.95.1010917114823.22773L-100000@rebel.rebel.net.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Thu, 13 Sep 2001 jeroen(dot)van(dot)rest(at)philips(dot)com wrote:

> Hi,
>
> We are working on a project that requires a platform-independent collection of modules. For example, we currently have a prototype version of a front-end running, developed with QT. I've also got postgreSQL running using CygWin. There is no need for
> network-functionality, everything should run on one machine, but we want to be able to transfer it completely (including database) from WinNT to Linux and back.
> We also need speed in this application. That's why we prefer to code in C(++).
>
> The question now is how to communicate from my front-end to the database and back? I don't know much about this part of systems, but I guess that ODBC and JDBC are the kind of stuff I need. But I am not sure if they have what I need. I don't think ODBC
> can run on Linux, or that there is a JDBC driver for (postgres on CygWin).

I am not sure baout how well teh win side of any psotgres stuff works<
I havent used it.

But if you are using c++ you can access postgres using c/c++ libraries
that are inlcuded with postegres(at elast they are under unix) and
referred to as libpq which also ahs I think a C++ bidning.

You coudl use odbc, which we use for ome projets at work here(thought i
have nto been invlovled with ODBC usage parts).

We also use JDBC to conenct to postgres.

And as alluded to above have also used C/C++ to access postgres via libpq.

All work fairly well, although I think there are some less comoanly parts
of he jdbc interfaces that are not implemtned under psotregs(or at least
there were last time I used it) - I have never suffffered because of this.

I suspect if you want speed then C/C++ is the best best over java, whether
that is directly via libpq or via odbc really depends on your app.

One thing we do with our apps is build our own library of routines for
accessing teh database fucntionality,.

We try to make it very genral and then only use it inteh applciations.
The idea here is if we ever want to move to a different Db, tehn we only
ahve to rewrite the implementationof the libarary as sopposed to re
wreitign large chunks of the app, which is what we woudl ahve to do if we
used libpq directly in the app code.

Anotehr appreoach with simialr benfirts thought nto as generally ueful is
to write a module that directly uses libpq but that does all of the
databse sutff.

Once again you only have to rewrite the module if you decide to change
dbs.

Jason

>
> Could anyone assist me here?
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

--
------------------------------------------------------------------------------
Jason Tan jason(at)rebel(dot)net(dot)au
"Democracy is two wolves and a lamb voting on what to have for lunch.
Liberty is a well-armed lamb contesting the vote."
~Benjamin Franklin, 1759
------------------------------------------------------------------------------

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Bo Lorentsen 2001-09-17 06:29:59 Re: accumulate setof ?
Previous Message Tom Lane 2001-09-16 18:51:11 Re: no attribute tuple 1259 -2