When to use database views and when not?

后端 未结 8 981
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-13 19:31

This question is about database views, not materialized-views.

Pros:

  • Query simplification.
  • Avoid repeat the same joins on mul
8条回答
  •  不知归路
    2020-12-13 19:50

    Views are pretty awesome when you don't entirely trust the party sending queries to your database. A good example might be you would create a view on tables for a contractor so that all they can see is the rows pertaining to their project.

提交回复
热议问题