Re: to create a database... - Mailing list pgsql-general

From Eric E
Subject Re: to create a database...
Date
Msg-id 43821E5F.6040001@gmail.com
Whole thread Raw
In response to to create a database...  ("P.M" <pmdanger@yahoo.com>)
List pgsql-general
Can you describe the versatility you're looking for?  Why does your
application need to run on multiple DB's?  Is the user going to be
selecting a backend database?  I'd consider how compelling your reasons
for supporting multiple databases are, because it will be quite a bit of
work even with compatibility layers, and you could get bogged down in
supporting different trees of SQL before you even finish the app.

If you want a full database abstraction layer, you might want to
consider NHibernate (http://www.nhibernate.org/).  Whether or not you
use something that extensive, you will certainly need to take care to
abstract your database completely away from your program's operation.
NHibernate has some rudimentary support for creating schemas from
classes, but AFAIK it's not that complete.  Functions and stored
procedures and stored procedures tend to be very specific to one RDBMS,
so they work against that kind of abstraction, and I'd avoid using them
unless you absolutely need to.

Another alternative is PHP and ADODB, which works like the ADO recordset
interface in VB6.  This really works best for SELECTs, thought works OK
for INSERTs.   It has a number of nice optimization features as well.

Yet another option for multiple database support that is a lot more
work, but totally portable is to expose your data via Web Services
rather than making direct database calls.  That's useful when you want
to be able to hook different things up to your app, and frees you from
reliance on a single language or interface for the UI.  The work to do
it is generally only justified if you've got a big application with lots
of people interacting with it.

Not to be repetive, but I'd really think carefully about how much you
need support for multiple RDBMS in your application.  Hope some of the
above helps.

Cheers,

Eric

P.M wrote:

> Hi,
>
> I'm creating a Visual Basic.net application and i would like to make
> my application versatile.
>
> For that, it should be able to create the same DB on different RDBMS
> like PostGreSQL, MySQL or MSSQL.
>
> I would like to know what is the best way to create a DB from
> scratch... (DB, table, users, functions,...)
>
> - to use a SQL text file
> - to create a new function inside template1 db, and to execute it after,
> - ...
>
> please, help me.
>
> thanks a lot,
> Maileen
>
> ------------------------------------------------------------------------
> Yahoo! FareChase - Search multiple travel sites in one click.
>
<http://us.lrd.yahoo.com/_ylc=X3oDMTFqODRtdXQ4BF9TAzMyOTc1MDIEX3MDOTY2ODgxNjkEcG9zAzEEc2VjA21haWwtZm9vdGVyBHNsawNmYw--/SIG=110oav78o/**http%3a//farechase.yahoo.com/>





pgsql-general by date:

Previous
From: "Hakan Kocaman"
Date:
Subject: Re: Multi-parameter aggregates.
Next
From: "Florian G. Pflug"
Date:
Subject: Re: Multi-parameter aggregates.