SQLServerCentral Editorial

Using Views

,

There are so many ways to undertake development inside of SQL Server. The growth of the platform has given us many options for solving problems and implementing features. However fundamentally altering schemas has continued to be problematic and challenging for many database developers.

Many applications are tightly tied to the underlying schema, and changing columns or tables is often so difficult that developers hesitate to make changes. Migration scripts help, but they must be manually created and are still daunting enough that many developers still avoid making changes that are potentially destructive. 

I was watching a session recently on another topic, but as part of the demo, there were changes being made to the schema while an application continued to insert and update rows without breaking. I've rarely seen people bother with this, but I'm wondering how many of you use this technique:

Are you using views to allow schema changes?

The demo showed the rename of a table and the creation of a view to allow an application to continue to work with minimal delays. A well designed application that retries batches wouldn't flinch at this change. Once it's complete, further schema alterations like horizontal/vertical partitioning can occur seamlessly.

I used this technique back in v6.5, but there were problems scaling views and I've been hesitant to try it since. However the performance of SQL Server has vastly improved and I'm interesting in whether or not others are using this regularly to upgrade their applications without downtime.

Rate

4 (1)

You rated this post out of 5. Change rating

Share

Share

Rate

4 (1)

You rated this post out of 5. Change rating