• Believe it or not, but this is taught in a course I just took for the SQL Server 2008 R2: Database Developer certification. It's covered with creating and altering views.

    In my case, it was covered when defining uses for indexed views. Some applications hard code access to specific tables. A view can be created to replace the old object with the new structure and suffer little to no downtime from the application.

    I myself have not practiced this technique, but it did catch my attention when I heard it from the course. That's because it surely sounded like a best practice that I'm sure everyone should pick up on.

    Here are my notes from that particular section being I have it up.

    What can you use indexed views for?

    1. Improve Performance

    1a. You can have indexed views compute and store data to improve performance.

    2. Filter or Restrict Access To Data

    2a. Views can be used to filter or restrict access to data because you specify which columns are included in a view in a defining query.

    3. Manipulate Data

    3a. If you often need to execute queries that require one or more tables to be joined together, you can use a view to always to it.

    4. Restructure Tables

    4a. Some applications hard-code access to specific tables. View can be created in replace of the old object with the new structure.

    5. Customize Data

    5a. Views can be used to customize data for the user viewing it.

    6. Importing and Exporting Data

    6a. You can define the data you wish to export in the views definition. The BCP utility can then use the view as the source.