当前位置:网站首页>GBASE 8s的数据视图
GBASE 8s的数据视图
2022-06-25 03:59:00 【八珍豆腐】
视图是由存储在数据库中的查询定义的虚拟表(Virtual Table)。视图所对应的查询称为视图定义,它规定了如何从一个或几个基本表(Base Table)中导出视图。在数据库中只存放视图的定义,不存放视图对应的数据,数据仍存放在导出视图的基本表中。修改基本表中的数据,相应视图中的数据也随之改变。视图就像一个窗口,透过它可以看到数据库中自己感兴趣的数据。
在SQL 中,定义视图是设计数据库外模式的基本手段。视图能够为数据库系统提供以下优势。
1.数据的逻辑独立性
当数据库的模式结构发生变化时,只需调整外模式到模式的映射关系,而无须改变外模式的定义。这样做的目的是保证用户的应用程序不必重新编写。视图作为虚拟表,其定义实际上就是外模式到模式的映射。有了视图,就可以在不改变基本表结构的前提下,仅通过修改视图的定义就能够更新这种映射关系,从而实现数据的逻辑独立性。
2.用户操作的简化
在实际的数据库系统中,全部基本表的结构和联系往往很复杂。通常不同部门的用户只对数据库中的一部分数据感兴趣。视图机制正好适应了用户的这种需要。为不同的用户定义各自的视图,使用户可以将注意力集中在所关心的数据上,用户所做的只是对虚拟表的查询,而这个虚拟表是怎样得到的,用户无须了解。
3.数据的安全保护
视图机制还能够为数据提供一定的安全保护功能,只给用户访问视图的权限,对用户保密的基本表不为其定义视图。这样用户只能透过视图访问到其所需的那部分数据,而不会影响到其他数据。
边栏推荐
- The 5th series of NFT works of missing parts was launched on the sandbox market platform
- Error 1062 is reported during MySQL insertion, but I do not have this field.
- Where is the red area of OpenCV?
- A-table mouse over the display hand, the current line can be clicked
- List rendering in wechat applet
- 如何绘制产业招商地图
- 无法安装redis接口
- kenlm
- openmmlab-环境配置
- 马斯克发布人形机器人,AI对马斯克为什么意义重大?
猜你喜欢

论文笔记: 多标签学习 ESMC (没看懂, 还没写出来, 暂时放这里占个位置)

小白学习MySQL - 统计的'投机取巧'

"Renaissance" in the digital age? The bottom digital collection makes people happy and sad

Where is the red area of OpenCV?

Lecture record: history and development of strapdown inertial navigation solution

Basic use of OBS browser+ browser

SEO的5大关键指标:排名+流量+会话+停留时长+跳出率

navicat可不可以直接操作安卓数据库SQLite
![[openwrt] we recommend a domestically developed version of openwrt, an introduction to istoreos. It is very easy to use. It is mainly optimized. It solves the problem of Sinicization.](/img/62/6152d5a30c92a340cb286c7b1cbc54.png)
[openwrt] we recommend a domestically developed version of openwrt, an introduction to istoreos. It is very easy to use. It is mainly optimized. It solves the problem of Sinicization.

Smart wind power: operation and maintenance of digital twin 3D wind turbine intelligent equipment
随机推荐
How many images can opencv open?
95% 程序员都在这里摸鱼……
论文笔记: 多标签学习 ESMC (没看懂, 还没写出来, 暂时放这里占个位置)
SQL, CTE, FLG CASE问题
论文阅读《LSD-SLAM: Large-Scale Direct Monocular SLAM》
Hello CTP (III) - CTP quotation API
Hello CTP (II) -- Introduction to CTP
Flutter Builder & futurebuilder components
Can Navicat directly operate the Android database SQLite
Doubts about judging the tinyint field type of MySQL
MySQL order by
JS arrow function
【openwrt】推荐一个国内开发的openwrt的版本,iStoreOS简介,非常好用,主要是做了一些优化。解决了汉化的问题。
Flutter Builder & FutureBuilder组件
关于TCP连接三次握手的详细总结
kenlm
【LeetCode】148. Sort linked list
Where is the red area of OpenCV?
EasyRecovery15非常好用的电脑数据恢复软件
LeetCode 劍指Offer II 091 粉刷房子[動態規劃] HERODING的LeetCode之路