How loose coupling DB interaction when using ORM

I am really struggling with understanding how you are loose coupling your app with a DB when you use an ORM. I understand there are code first and data first design patterns and in some scnearios (Straight forward schemas....some e-commerce, etc) this makes sense. When you have more complex and / or changing schemas during a development phase how do you not handcuff yourself with tightly coupling to the DB.

I am just trying to understand how to apply a valid / robust process for dealing with typical changes to data structures.

Thanks,

S

Answers


You are tightly coupled to the ORM tool, but not the DB. You can take your complete application and move it to another database with just a few lines changed in your hibernate configuration. By changing the database dialect, and the jdbc url to match the new database server, you can port your application from MySql, to PostgreSQL, to Oracle, to SqlServer. That's the loose coupling.


Need Your Help

NSString function

iphone nsstring nslog

I get a null return when i try out my NSString function.

SoapUI error on request - NoClassDefFoundError

java web-services soap soapui

I am new to web services and I have deployed a web service locally ( I am able to see the wsdl)

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.