当前位置:网站首页>GBASE 8s的数据视图
GBASE 8s的数据视图
2022-06-25 03:59:00 【八珍豆腐】
视图是由存储在数据库中的查询定义的虚拟表(Virtual Table)。视图所对应的查询称为视图定义,它规定了如何从一个或几个基本表(Base Table)中导出视图。在数据库中只存放视图的定义,不存放视图对应的数据,数据仍存放在导出视图的基本表中。修改基本表中的数据,相应视图中的数据也随之改变。视图就像一个窗口,透过它可以看到数据库中自己感兴趣的数据。
在SQL 中,定义视图是设计数据库外模式的基本手段。视图能够为数据库系统提供以下优势。
1.数据的逻辑独立性
当数据库的模式结构发生变化时,只需调整外模式到模式的映射关系,而无须改变外模式的定义。这样做的目的是保证用户的应用程序不必重新编写。视图作为虚拟表,其定义实际上就是外模式到模式的映射。有了视图,就可以在不改变基本表结构的前提下,仅通过修改视图的定义就能够更新这种映射关系,从而实现数据的逻辑独立性。
2.用户操作的简化
在实际的数据库系统中,全部基本表的结构和联系往往很复杂。通常不同部门的用户只对数据库中的一部分数据感兴趣。视图机制正好适应了用户的这种需要。为不同的用户定义各自的视图,使用户可以将注意力集中在所关心的数据上,用户所做的只是对虚拟表的查询,而这个虚拟表是怎样得到的,用户无须了解。
3.数据的安全保护
视图机制还能够为数据提供一定的安全保护功能,只给用户访问视图的权限,对用户保密的基本表不为其定义视图。这样用户只能透过视图访问到其所需的那部分数据,而不会影响到其他数据。
边栏推荐
- NFT insider 63: the sandbox reached a cooperation with Time magazine, and YGG established Spain's subdao
- Failed to install redis interface
- A detailed summary of four handshakes (or four waves) over TCP connections
- Synchronous and asynchronous functions (callback function, promise, generator, async/await)
- Laravel document sorting 9. Blade template
- Laravel document sorting 10. Request life cycle
- Cesium loading display thermal diagram
- "Renaissance" in the digital age? The bottom digital collection makes people happy and sad
- Cesium drag 3D model
- List rendering in wechat applet
猜你喜欢
Hello CTP (II) -- Introduction to CTP
论文笔记: 多标签学习 ESMC (没看懂, 还没写出来, 暂时放这里占个位置)
小心被偷脸!天天用的人脸识别风险原来这么多?
Exercise: how difficult is it to simulate the blessing lottery two-color ball - China 500W grand prize? Just run the code.
Anaconda安装+TensorFlow安装+Keras安装+numpy安装(包含镜像和版本信息兼容问题)
PHP code audit 1 - php Ini
文本关键词提取:ansj
numpy np tips:使用opencv对数组插值放缩到固定形状 cv2.resize(res, dsize=(64, 64), interpolation=cv2.INTER_CUBIC)
95% 程序员都在这里摸鱼……
Siddhartha: the book of life can be regurgitated frequently
随机推荐
SQL, CTE, FLG CASE问题
Uniapp makes mobile app programs, using uni Choosevideo record video, video playback is fuzzy, and the resolution is low
Laravel document sorting 4. Controller
Simple integration of client go gin -update
MySQL order by
Is opencv open source?
BSC smart contract dividend mainstream currency | including marketing wallet | deflation | reflow | dividend free token | available for direct deployment
PHP extracts and analyzes table contents, and collects bidding information
A detailed summary of four handshakes (or four waves) over TCP connections
【LeetCode】143. Rearrange linked list
Finereport (sail soft) handling the problem that the histogram data label is blocked
5 key indicators of SEO: ranking + traffic + session + length of stay + bounce rate
Leetcode points to the leetcode road of offering II 091 house painting [dynamic planning] heroding
Lecture record: data processing methods and applications of various spatial geodetic techniques
IntStream API介绍
如何绘制产业招商地图
Upgrade cmake
【Kubernetes系列】Helm的安装使用
Flutter Builder & FutureBuilder组件
Shutter fittedbox component