Peter Gfader's brain noise
How to: zero-downtime database deployments

Great idea to split database deployments in 2 steps.

  1. expansion scripts
  2. contraction scripts (cleanup)

The expansion scripts are run at some point prior to upgrading the application and the contraction scripts are run once the system has been upgraded and considered stable. This produces a nice benefit of decoupling database migrations from application deployments. The expansion scripts could be run a day or more in advance of the application deployment at a time that is convenient for database changes. The contraction scripts could be run potentially days after the deployment once everything has been validated with the new release.

Weekly Release Blog #11 – Zero-Downtime Database Deployment
http://exortech.com/blog/2009/02/01/weekly-release-blog-11-zero-downtime-database-deployment/

Is the database your center of the architecture? via @unclebobmartin

Do you need a relational SQL store? 

Great story from Uncle Bob about his experience with databases and architecture.

NO DB
http://blog.8thlight.com/uncle-bob/2012/05/15/NODB.html

Interesting points:

We certainly didn’t need a process with a multi-megabyte footprint sitting in memory and burning cycles. (Remember, this was the ‘80s)

Relational databases are huge beasts. Consider other options. Flat files work as well!

The center of your application is not the database. Nor is it one or more of the frameworks you may be using. The center of your application are the use cases of your application.

Ask yourself: Why are we building this? What problem do we solve for our customer?

Here’s what an application should look like. The use cases should be the highest level and most visible architectural entities. The use cases are at the center. Always! Databases and frameworks are details! You don’t have to decide upon them up front. You can push them off until later, once you’ve got all the use cases and business rules figured out, written, and tested.

The database is just a detail that you don’t need to figure out right away.

Notes on .NET and Oracle

Pain with ODP.NET

  • libraries are version specific - Must have 10g ODP.Net for 10g install, 11g for 11g, etc.
  • The ODP.Net drivers rarely work with Visual Studio tooling, and I think still lack any support for LINQ or EF.
  • Bad support
  • Memory leaks with CLOB

Good (contradictions though)

  • ODP.NET 11g works with any version of Oracle Database back to 9.2
    This enhancement was introduced starting in ODP.NET 10.2.0.4
  • Multiple versions of ODP.NET can live on the same box as well
  • XCOPY deployment. You no longer need to use the Oracle Installer to install. We give you files and you just need to gac a few DLLs and update the registry. To download this version look for the “ODAC with Xcopy” download in the list.

June 2009: “System.Data.OracleClient” deprecated in .NET 4
http://blogs.msdn.com/b/adonet/archive/2009/06/15/system-data-oracleclient-update.aspx

Major players
Oracle ODP.NET: http://www.oracle.com/technology/tech/dotnet/msoc/index.html
DataDirect Technologies : http://www.datadirect.com/index.ssp
OpenLink: http://www.openlinksw.com/
Devart: http://devart.com/dotconnect/

ODP.NET home
http://www.oracle.com/technetwork/topics/dotnet/index-085703.html

Oracle Developer Tools for VS2010
http://www.oracle.com/technetwork/developer-tools/visual-studio/overview/index-097110.html