文章目录
1、Definition
1)视图产生的原因
In some cases, it is not desirable for all users to see the entire logical model (that is, all the actual relations stored in the database.).A view provides a mechanism to hide certain data from the view of certain users.
也就是说,视图是对数据库中逻辑关系的一层封装,隐藏了原始数据库中的一些内容。视图提供了一种可以隐藏特定数据的机制。
2)定义
Any relation that is not of the logical model but is made visible to a user as a “virtual relation” is called a view.
也就是说,所有用户见到的,但不是最原始的逻辑模型,称之为视图,视图不是真正的逻辑模型,也就是说,视图不会在数据库中新建一张表。
补充说明相关术语:
逻辑模型:逻辑模型指的是数据库中数据之间的关系,通俗理解,就是数据表,将一张表称为一个逻辑关系。
物理模型:数据库中数据在磁盘中真实存在的位置关系,比如某个数据在哪个磁道,哪个盘面,哪个扇区。
在下文中,将会以逻辑关系表示数据表。
3)视图和普通查询的区别
- 视图得到的解雇不