当前位置:网站首页>GBASE 8s的数据视图
GBASE 8s的数据视图
2022-06-25 03:59:00 【八珍豆腐】
视图是由存储在数据库中的查询定义的虚拟表(Virtual Table)。视图所对应的查询称为视图定义,它规定了如何从一个或几个基本表(Base Table)中导出视图。在数据库中只存放视图的定义,不存放视图对应的数据,数据仍存放在导出视图的基本表中。修改基本表中的数据,相应视图中的数据也随之改变。视图就像一个窗口,透过它可以看到数据库中自己感兴趣的数据。
在SQL 中,定义视图是设计数据库外模式的基本手段。视图能够为数据库系统提供以下优势。
1.数据的逻辑独立性
当数据库的模式结构发生变化时,只需调整外模式到模式的映射关系,而无须改变外模式的定义。这样做的目的是保证用户的应用程序不必重新编写。视图作为虚拟表,其定义实际上就是外模式到模式的映射。有了视图,就可以在不改变基本表结构的前提下,仅通过修改视图的定义就能够更新这种映射关系,从而实现数据的逻辑独立性。
2.用户操作的简化
在实际的数据库系统中,全部基本表的结构和联系往往很复杂。通常不同部门的用户只对数据库中的一部分数据感兴趣。视图机制正好适应了用户的这种需要。为不同的用户定义各自的视图,使用户可以将注意力集中在所关心的数据上,用户所做的只是对虚拟表的查询,而这个虚拟表是怎样得到的,用户无须了解。
3.数据的安全保护
视图机制还能够为数据提供一定的安全保护功能,只给用户访问视图的权限,对用户保密的基本表不为其定义视图。这样用户只能透过视图访问到其所需的那部分数据,而不会影响到其他数据。
边栏推荐
- Openmmlab environment configuration
- kenlm
- How many images can opencv open?
- [kubernetes series] installation and use of Helm
- 2. play the chromatic harmonica
- Is opencv open source?
- SQL, CTE, flg case problems
- 地方/园区产业规划之 “ 如何进行产业定位 ”
- LeetCode 劍指Offer II 091 粉刷房子[動態規劃] HERODING的LeetCode之路
- Text keyword extraction: ansj
猜你喜欢

1. Phase II of the project - user registration and login

1、项目第二阶段——用户注册和登陆

Exercise: how difficult is it to simulate the blessing lottery two-color ball - China 500W grand prize? Just run the code.

navicat可不可以直接操作安卓数据库SQLite

单元测试覆盖率

Basic use of OBS browser+ browser

Hello CTP (IV) - CTP transaction API

Intel 13th generation core showed its true colors for the first time: 68mb cache improved significantly

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

Can Navicat directly operate the Android database SQLite
随机推荐
Cesium graphic annotation circle, square, polygon, ellipse, etc
Standing wave ratio calculation method
95% 程序员都在这里摸鱼……
515. 在每个树行中找最大值 / 剑指 Offer II 095. 最长公共子序列
【LeetCode】22. bracket-generating
openmmlab-环境配置
【Kubernetes系列】Helm的安装使用
Upgrade cmake
Although the Internet in the traditional sense has long ceased to exist, this does not mean that the Internet has long disappeared
1、项目第二阶段——用户注册和登陆
如何筛选出和产品相关的词,精准排除掉无效词
Win10 environment phpstudy2016 startup failure record
什么是持久化?redis 持久化中的RDB和AOF是什么?
Can Navicat directly operate the Android database SQLite
1. first knowledge of chromatic harmonica
Laravel document sorting 6. Response
Coinlist queuing tutorial to improve the winning rate
Laravel document sorting 9. Blade template
"Renaissance" in the digital age? The bottom digital collection makes people happy and sad
La gamme NFT Color, qui représente la diversité, est en ligne sur la plate - forme du marché Sandbox