What are views good for?

后端 未结 14 1353
你的背包
你的背包 2020-11-28 03:31

I\'m just trying to get a general idea of what views are used for in RDBMSes. That is to say, I know what a view is and how to make one. I also know what I\'ve used them f

14条回答
  •  余生分开走
    2020-11-28 04:00

    Anytime you need [my_interface] != [user_interface].

    Example:

    TABLE A:

    • id
    • info

    VIEW for TABLE A:

    • Customer Information

    this is a way you might hide the id from the customer and rename the info to a more verbose name both at once.

    The view will use underlying index for primary key id, so you won't see a performance loss, just better abstraction of the select query.

提交回复
热议问题