Replace Oracle db with Postgres db , add an adapter - postgresql

I have a source code querying an Oracle database.
Is it possible to replace the Oracle database by a PostgreSQL database without modifying the source code ?
I thought about adding an adapter/wrapper module between my source code and the PostgreSQL db for the source code to be compatible with PostgreSQL.
Thanks

PostgreSQL is strict about ISO SQL standard implementation. Most recent Oracle versions are also compliant. Oracle usually implemented some feature long before
it was standardized therefor their dialects is slightly different.
Nowadays various SQL features have duplicate implementation in Oracle, an original one a ISO one.
Look Ora2pg, is this a Perl code which can convert a lot of Oracle code into Postgres.
Try to modify your Oracle code in Oracle database to be ISO SQL compliant, even before starting actual migration. Such a code can run on both databases without any changes.
Then you finally move from Oracle to Postgres

Related

Can MySQL Workbench Forward Engineer (Generate DDL) for Relational Databases other than MySQL (such as MS SQL Server, PostGreSQL, Oracle, etc.)

I was under the impression that MySQL Workbench could be used to generate DDL for relational databases other than MySQL.
This question from 2010 says no, the only way to do it is to generate DDL for MySQL and then manually convert it.
Has there been any changes in the meantime? Any plugins?
Thank you -- Matthew Moisen
I'm a MySQL Workbench dev and I can tell you firsthand that nothing have changed about this.

Entity Framework 4.2 Code First DBMS support

What DB Management Systems does EF 4.2 Code First support?
I'd like to use Code First with MySQL and Oracle. Do I have to download extra things?
Thanks!!
It supports the most of the popular DBMS's like Oracle, MySQL, PostgreSQL and SQLite other than SQL Server. Yes you have to download database connectors for them. Here is a good tutorial to get you started.

Use Postgresql as a datasource for Microsoft Analysis Services

Has anyone managed to use Postgresql as a datasource for SSAS? The Postgresql .NET connector seems promising, but the SSAS view wizard does not seem to be able to see the tables in the database.
Try using the ODBC connector. I've had success getting other tools to connect to PG using it. The EnterpriseDB installers not only include a well packaged, working version of PG for windows, they include working, correctly installed drivers.
http://www.enterprisedb.com/products-services-training/pgdownload
try pg_bulkload for load from via c# & from mssql to pgsql
copy & bcp (ssis) for second direction (pgsql->ssas)
242
It is actually possible to hack the Postgresql .NET connector and implement a "MSSQL compatibility mode", where the [ and ] around tables and schema names are removed. Using this, the list of tables does not appear in MS SSAS, but it is possible to replace them by views.

Using embedded firebird database with .NET

I want to use Embedded FireBird with .NET 3.5. I have few queries:
(1) Are there any new developments done on the embedded version by the FireBird community?
(2) Are there any database file repair & optimize (shrink etc.) features in it?
(3) Does it supports Triggers, Foreign Keys, PL/SQL type of things etc.?
(1) Are there any new developments
done on the embedded version by the
FireBird community?
Yes, both the embedded and the client-server version are very active projects.
Using the same embedded version dll for ADO.NET for example, you can use the most recent version of the firebird engine dlls, even if the ADO.NET Firebird provider is not build for that version, but for a previous.
Check the issue tracker here: http://tracker.firebirdsql.org/secure/Dashboard.jspa
(2) Are there any database file repair
& optimize (shrink etc.) features in
it?
Yes, as described here: http://www.firebirdfaq.org/faq324/. You need to install the client-server version of firebird to use GFIX and GBAK from the command line. It is just a few megabytes.
Firebird does not have a "Compacting" feauture to shrink the database. You need to backup and then restore the database to do this. However you can use a firebird database for years without backup/restore (if you are lucky and the hard disk does not die). The only thing that you might need to do is to recalculate all indeces selectivity as described here: http://www.firebirdsql.org/dotnetfirebird/blog/2005/03/improving-query-performance-through.html
(3) Does it supports Triggers, Foreign
Keys, PL/SQL type of things etc.?
Yes. The 2.5 version of the embedded engine also supports accessing the same database file from different proccess at the same time.
Answering your questions:
The Embedded version is like a normal Firebird but encapsulated in a DLL and with some minor limitations. The Firebird Team just released some days ago the 2.5 version of SuperServer, Classic and Embedded flavors. More info at Embedded Firebird Server and Firebird website.
There are tools to repair and optimize databases. Check How to repair a corrupt Firebird database
Firebird is SQL:2003 conformant as stated in Firebird: SQL Conformance. It has triggers, foreiggn keys and stored procedures.
Hope that helps

Good OleDB/ODBC provider for PostgreSQL

I'm in need of a functional OleDB data provider for PostgreSQL. It should be similar to the ODBC provider for MySQL. See http://dev.mysql.com/downloads/connector/odbc/5.1.html
The postgres software catalog has some providers on there.
dotConnect for PostgreSQL (from Devart) offers a pretty good one. It is fast and works. The free version will give you your basic ADO.net support, the pay offers everything else. ODBC doesn't have a free version.
http://www.devart.com/dotconnect/postgresql/
edit
Adding the direct link to the ODBC connector as it is on a separate page.
https://www.devart.com/odbc/postgresql/
If you want to check the last version of ODBC for PosgreSQL :
http://www.postgresql.org/ftp/odbc/versions/
Enter in the "msi" folder for the installer.
But be careful, when you are using ODBC, there is a 32bits and a 64bits version. So choose the right one.