Re: Managing database with PostgreSQL - Mailing list pgsql-jdbc

From Simon Kitching
Subject Re: Managing database with PostgreSQL
Date
Msg-id 000001c226ec$73e8d010$2cbe87ca@ecnnz.ecnetwork.co.nz
Whole thread Raw
In response to Re: Managing database with PostgreSQL  (Dave Cramer <Dave@micro-automation.net>)
List pgsql-jdbc
Salut Elsa,

The anwser to your question depends on what you want to do.

If you really want a separate database running on each user's machine,
then you need to install the database on each machine (logical, really).
This is usually the approach for home user/ very small businesses.
Advantages:
* applications can run against their local database without
  being connected to any network;
* each user can administer their own database so they don't need to
  contact a "database administrator" to do restricted operations.
Disadvantages:
* data isn't centralised in one place
* lots of separate databases to administer, backup, etc.
* it isn't easy to share data between users

The alternative is to set up a central database server, which
applications
running on each user's machine connect to. This is usually the approach
used for medium/large businesses.
Advantages:
* data can easily be shared
* central machine can be properly administered (eg backups)
* central machine can be scaled up to meet demand
Disadvantages:
* applications can't work disconnected from the central database.

Microsoft access is a "trivial" database, which is really meant to be
used in the first way, but can be used as a central server for small
numbers of users.

Postgresql, MySql, Microsoft SQLServer, Oracle, DB2, etc *can* be used
on
individual machines, but are really aimed at the second category.
They are more difficult to administer, but *do* handle large amounts
of data and large numbers of users which MS Access is never intended to.

If you do have a small project, but want to use open-source products,
there are various alternatives that may be easier than postgresql.

As Dave mentioned, jdbc connections take host and port parameters
as part of the "url" parameter used when connecting, so the
database doesn't need to be on the same machine. All you *need* on the
client machine is the jdbc driver (pgjdbc2.jar). This is the same for
(almost) any jdbc-compliant database, you just need the library
containing
the jdbc driver on the client. See the postgresql docs about what
parameters
you need to establish a database connection using jdbc. I presume so far
you have been using the jdbc-odbc bridge, which is slightly different.

Whether you *want* to have a database on each machine, or a central one,

depends on what you are trying to achieve (see above).

Regards,

Simon

> -----Original Message-----
> From: pgsql-jdbc-owner@postgresql.org
> [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Dave Cramer
> Sent: Tuesday, July 09, 2002 1:51 AM
> To: Elsa LARREUR
> Cc: pgsql-jdbc@postgresql.org
> Subject: Re: [JDBC] Managing database with PostgreSQL
>
>
> Elsa,
>
> Postgres doesn't work like access, connections can be made
> via odbc, or jdbc.
>
> So no you don't have to have it running locally, just make a
> connection via jdbc, or odbc.
>
> Dave
> On Mon, 2002-07-08 at 08:24, Elsa LARREUR wrote:
> > Hi,
> >
> > Up to now, I managed an Access database with a JAVA application on
> > Windows NT. This database was registered in ODBC parameters.
> >
> > Now, I would like to port my database in order to use my appli with
> > Windows or Linux, and to do it, I've chosen to use
> PostgreSQL. So, I
> > woud like to know if we must install complete PostgreSQL everywhere
> > the JAVA appli is running or not?? (like with MS Acces :
> only ".mdb"
> > files are installed and registered). In other words, is it
> possible to
> > manage a pgsql database saved in a specific file?
> >
> > Thanks for your help,
> >
> > E.LARREUR
> >
> >
> >
> ______________________________________________________________________
> > ________
> > ifrance.com, l'email gratuit le plus complet de l'Internet !
> > vos emails depuis un navigateur, en POP3, sur Minitel, sur le WAP...
> > http://www.ifrance.com/_reloc/email.emailif
> >
> >
> >
> >
> >
> > ---------------------------(end of
> > broadcast)---------------------------
> > TIP 1: subscribe and unsubscribe commands go to
> majordomo@postgresql.org
> >
> >
> >
>
>
>
>
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an
> appropriate subscribe-nomail command to
> majordomo@postgresql.org so that your message can get through
> to the mailing list cleanly
>
>
>




pgsql-jdbc by date:

Previous
From: Aslak Hellesøy
Date:
Subject: MetaData Bug
Next
From: Tomisław Kityński
Date:
Subject: Re: PreparedStatement and DB default values