为什么不能打死飞蛾| 洛五行属性是什么| snidel是什么牌子| 知行合一什么意思| 护理专业出来能干什么| 多种维生素什么时候吃效果最好| 妇科千金片和三金片有什么区别| 啤酒是什么酿造的| 血压高什么不能吃| 吃完饭打嗝是什么原因| 减肥适合吃什么主食| 香油是什么油| 宁字属于五行属什么| 羊绒和羊毛有什么区别| 流加金念什么| 化疗后白细胞低吃什么食物补得快| 雷锋原名叫什么| 淋球菌是什么| 什么叫蛋白质| 秦始皇为什么要焚书坑儒| 留守儿童什么意思| 不惑之年什么意思| 足本是什么意思| oz是什么单位| 中暑是什么感觉| 性生活什么意思| 疤痕贴什么时候用最佳| 生机勃勃什么意思| 新生儿黄疸吃什么药| 铁皮石斛有什么作用| 阑尾在什么位置| 快乐源泉是什么意思| 星巴克是什么| 霉菌是什么引起的| dsa是什么| 冲浪什么意思| 立普妥是什么药| 须菩提是什么意思| 小姨子是什么关系| et是什么意思| 不伤肝的他汀类药是什么| 胃溃疡吃什么水果好| 长期口臭挂什么科| 微尘是什么意思| 牛乳是什么| 头发麻是什么原因| 小腹凸起是什么原因| 怀孕不能吃什么东西| 眼睛蒙蒙的是什么原因| 梦到发洪水是什么征兆| 为什么喝咖啡会心慌| 大姨妈来了吃什么水果好| 什么主筋骨| 梦见捡鸡蛋是什么预兆| 吃什么才能提高免疫力| 右眼跳是什么兆头| 奶水不足吃什么下奶最快| 喝什么对嗓子好| 郑板桥爱画什么| hmo是什么意思| 梦见牙碎了是什么预兆| 一路顺风是什么生肖| 6月3日什么星座| 听之任之是什么意思| 什么动物没尾巴| 甲状腺滤泡性肿瘤是什么意思| 皮下男是什么意思| 梦见孕妇大肚子是什么意思| 用激素药有什么副作用| 为什么一进去就软了| 1998年五行属什么| 飞吻是什么意思| 梦见媳妇出轨什么预兆| 书到用时方恨少下一句是什么| 比特币是什么意思| 为什么冬天容易长胖| 146是什么意思| 来大姨妈能喝什么饮料| 里急后重吃什么药最好| 一什么瓜地| hazzys是什么牌子价格| 甲减吃什么药| 舌头辣辣的是什么原因| 半干型黄酒是什么意思| 10.19什么星座| 锴字五行属什么| 乡试第一名叫什么| 金陵十二钗是什么意思| 喝三七粉有什么好处| 吃阿司匹林有什么副作用| 邮箱地址填什么| 施华洛世奇水晶是什么材质| 僧侣是什么意思| 泸州老窖什么档次| 下巴长痘是什么原因| 死了是什么感觉| 男怕穿靴女怕戴帽什么意思| 90年什么命| 白头发吃什么好| 嗔心是什么意思| 嘴皮发白是什么原因| 身体出现小红点是什么原因| 健康证是什么样的| 酸奶有什么营养价值| 率性是什么意思| 女生适合喝什么茶| im是什么意思| 牙根变黑是什么原因| 肩周炎是什么原因造成的| 乳腺增生是什么意思| 湿热会引起什么症状| 胃溃疡吃什么食物| 知柏地黄丸有什么作用| 姜枣茶什么时间喝最好| 耳道炎用什么药最有效| 月经每个月都提前是什么原因| 献血和献血浆有什么区别| 妈妈是什么意思| 子衿什么意思| 射精无力吃什么药| 不解大便是什么原因| 虎视眈眈是什么意思| 轮廓是什么意思| 夏天吹什么风| 旅游需要带什么东西| 便士是什么意思| 水浒传有什么故事| 嗓子疼是什么原因| 什么植物| 天狼星在什么位置| 头皮屑大块是什么原因| 国药准字h代表什么| 做梦梦到蛆是什么意思| 军字五行属什么| 酒精过敏什么症状| 乌鸦兄弟告诉我们什么道理| 男人喜欢什么罩杯| 除了胃镜还有什么检查胃的方法吗| 脑震荡有什么症状| 什么生火| 痔疮疼痛用什么药| a型血为什么叫贵族血| dmdm乙内酰脲是什么| 精液发黄是什么原因| 水车是什么意思| dwi是什么意思| 女人在什么时候最想男人| 蒲公英有什么药效| ua是什么单位| 可字属于五行属什么| 血红蛋白低吃什么补最快| 青少年手抖是什么原因| 汕是什么意思| 涵字五行属什么| 手舞足蹈是什么生肖| 什么病需要做手术| 黄山四绝是什么| 处女座前面是什么星座| 单位时间是什么意思| 什么是龙抬头| 什么的向日葵| 什么食物对眼睛好| 什么是回南天| 阴平阳秘是什么意思| 骨头是什么垃圾| 桎梏什么意思| 方兴未什么| 拔完牙吃什么| 家里有壁虎是什么征兆| 木耳菜不能和什么一起吃| 肚脐眼左边疼是什么原因| bpd是胎儿的什么| 耳塞戴久了有什么危害| 龟是什么意思| 为什么不能踩死蜈蚣| 多汗症挂什么科| hpv45型阳性是什么意思| 87年属什么的| 157是什么意思| 胳肢窝疼痛是什么原因| 5月22日是什么星座| 1226是什么星座| 什么拼音怎么写| 及什么意思| 王维字什么| 长春有什么好吃的| 什么情况下需要做宫腔镜| 什么食物含铁量最高| 颈椎压迫神经挂什么科| 角质增生是什么意思| 龙和什么属相最配| 增生期子宫内膜是什么意思| 观音坐莲什么意思| 罗勒叶在中国叫什么| 春风十里不如你什么意思| 宫颈筛查是什么| 憩室是什么意思| 十月十九是什么星座| 火气太旺是什么原因| 瘦人吃什么能长胖| 有趣的灵魂是什么意思| 胎停是什么意思| 什么是个性| 肚脐上面是什么部位| 抿嘴是什么意思| 心电图伪差是什么意思| 躯体化什么意思| 眼线是什么意思| 结晶体是什么意思| 观音土是什么| 早晨起来嘴苦是什么原因| 乳腺导管局限性扩张是什么意思| 滴虫是什么| 恐龙生活在什么时代| 内热是什么意思| 加油什么意思| 1950年属虎的是什么命| 咳嗽可以吃什么| 杀鸡给猴看什么意思| 尾戒代表什么| molly英文名什么意思| 斗拱是什么意思| 手足口病是什么症状| 2月12日什么星座| grn什么颜色| 房子什么朝向好| 世交是什么意思| 什么的饭菜| 央行放水是什么意思| 灰指甲用什么药效果好| 后位子宫什么意思| 脚浮肿吃什么药| 梦见坟墓是什么意思| 冷宫是什么意思| 地势是什么意思| 高温天气喝什么茶解暑| 伸筋草主治什么病| 口扫是什么| 用字五行属什么| 铅是什么东西| 肺气肿是什么病| 天秤女和什么座最配对| 舌头发黑是什么原因| 心理学是什么| 儿童咽峡炎吃什么药| 舌头干涩是什么病前兆| 怀孕不能吃什么东西| 天麻不能和什么一起吃| 卯时属什么| 红脸代表什么| 桃花眼的女人什么命| 手掌像什么| 心脏是由什么组织构成的| 红枣不能和什么一起吃| 2003属什么| 为什么会有颈纹| 为什么头发会变白| 两个束念什么| 脾不统血吃什么中成药| 1889年属什么生肖| 为什么夏天容易掉头发| 黄明胶是什么| 什么快递可以寄宠物| 眉毛里面长痘痘是什么原因| 百度Jump to content

有才!隋柯名一人饰两角 翻唱《三生三世》片尾曲走红

From Wikipedia, the free encyclopedia
(Redirected from View (database))
百度 但记者在现场也听到了另一种说法,租金收益或许是违建久拆不得的一个原因。

In a database, a view is the result set of a stored query that presents a limited perspective of the database to a user.[1] This pre-established query command is kept in the data dictionary. Unlike ordinary base tables in a relational database, a view does not form part of the physical schema: as a result set, it is a virtual table[1] computed or collated dynamically from data in the database when access to that view is requested. Changes applied to the data in a relevant underlying table are reflected in the data shown in subsequent invocations of the view.

Views can provide advantages over tables:

  • Views can represent a subset of the data contained in a table. Consequently, a view can limit the degree of exposure of the underlying tables to the outer world: a given user may have permission to query the view, while denied access to the rest of the base table.[2]
  • Views can join and simplify multiple tables into a single virtual table.[2]
  • Views can act as aggregated tables, where the database engine aggregates data (sum, average, etc.) and presents the calculated results as part of the data.
  • Views can hide the complexity of data. For example, a view could appear as Sales2020 or Sales2021, transparently partitioning the actual underlying table.
  • Views take very little space to store; the database contains only the definition of a view, not a copy of all the data that it presents.
  • Views structure data in a way that classes of users find natural and intuitive.[2]

Just as a function (in programming) can provide abstraction, so can a database view. In another parallel with functions, database users can manipulate nested views, thus one view can aggregate data from other views. Without the use of views, the normalization of databases above second normal form would become much more difficult. Views can make it easier to create lossless join decomposition.

Just as rows in a base table lack any defined ordering, rows available through a view do not appear with any default sorting. A view is a relational table, and the relational model defines a table as a set of rows. Since sets are not ordered — by definition — neither are the rows of a view. Therefore, an ORDER BY clause in the view definition is meaningless; the SQL standard (SQL:2003) does not allow an ORDER BY clause in the subquery of a CREATE VIEW command, just as it is refused in a CREATE TABLE statement. However, sorted data can be obtained from a view, in the same way as any other table — as part of a query statement on that view. Nevertheless, some DBMS (such as Oracle Database) do not abide by this SQL standard restriction.

Read-only vs. updatable views

[edit]

Views can be defined as read-only or updatable. If the database system can determine the reverse mapping from the view schema to the schema of the underlying base tables, then the view is updatable. INSERT, UPDATE, and DELETE operations can be performed on updatable views. Read-only views do not support such operations because the DBMS cannot map the changes to the underlying base tables. A view update is done by key preservation.

Some systems support the definition of INSTEAD OF triggers on views. This technique allows the definition of other logic for execution in place of an insert, update, or delete operation on the views. Thus database systems can implement data modifications based on read-only views. However, an INSTEAD OF trigger does not change the read-only or updatable property of the view itself.

Materialized views

[edit]

Various database management systems have extended the views from read-only subsets of data, particularly materialized views: pre-executed, non-virtual views commonly used in data warehousing. They give a static snapshot of the data and may include data from remote sources. The accuracy of a materialized view depends on the frequency of trigger mechanisms behind its updates.

Materialized views were introduced by Oracle Database, while IBM Db2 provides so-called "materialized query tables" (MQTs) for the same purpose. Microsoft SQL Server introduced in its 2000 version indexed views which only store a separate index from the table, but not the entire data. PostgreSQL implemented materialized views in its 9.3 release.

Equivalence

[edit]

A view is equivalent to its source query. When queries are run against views, the query is modified. For example, if there exists a view named accounts_view with the content as follows:

-- accounts_view:
-------------
SELECT name,
       money_received,
       money_sent,
       (money_received - money_sent) AS balance,
       address,
	   ...
  FROM table_customers c 
  JOIN accounts_table a 
    ON a.customer_id = c.customer_id

then the application could run a simple query such as:

-- Simple query
------------
SELECT name,
       balance
  FROM accounts_view

The RDBMS then takes the simple query, replaces the equivalent view, then sends the following to the query optimizer:

-- Preprocessed query:
------------------
SELECT name,
       balance
  FROM (SELECT name,
               money_received,
               money_sent,
               (money_received - money_sent) AS balance,
               address,
			    ...
          FROM table_customers c JOIN accounts_table a
               ON a.customer_id = c.customer_id        )

The optimizer then removes unnecessary fields and complexity (for example it is not necessary to read the address, since the parent invocation does not make use of it) and then sends the query to the SQL engine for processing.

See also

[edit]

References

[edit]
  1. ^ a b "25.5 Using Views". MySQL. Oracle. 2025-08-07. Archived from the original on 2025-08-07. Retrieved 2025-08-07. Views are stored queries that when invoked produce a result set. A view acts as a virtual table.
  2. ^ a b c Groff, James R.; Weinberg, Paul N. (1999). SQL: The Complete Reference (PDF). Osborne/McGraw-Hill. pp. 291–292. ISBN 0072118458.
雪对什么 pink是什么颜色 标的是什么 股市pe是什么意思 腿水肿是什么原因引起的
生地黄是什么 痈是什么意思 为什么放生泥鳅果报大 心肌缺血吃什么食物 2022年是什么生肖
中秋节的习俗是什么 痞是什么意思 息肉有什么症状出现 七月有什么节 糖尿病患者适合吃什么水果
土阜念什么 去医院看肛门挂什么科 durex什么意思 芒果与什么不能一起吃 夜来非是什么意思
飞吻是什么意思hcv9jop4ns8r.cn 神经官能症有什么症状表现hcv8jop0ns4r.cn 每天早上起床口苦是什么原因beikeqingting.com 俄罗斯特工组织叫什么hcv7jop9ns1r.cn 对别人竖中指是什么意思hcv9jop1ns0r.cn
梦见下大雨是什么预兆naasee.com 零点是什么hkuteam.com 思前想后是什么意思hcv8jop7ns5r.cn 什么是长孙hcv7jop5ns0r.cn 收阴是什么意思kuyehao.com
7月5号什么星座hcv8jop5ns2r.cn 补肾吃什么药最好hcv8jop2ns6r.cn 顺铂是什么药hcv8jop3ns3r.cn 什么是唐氏儿onlinewuye.com 37岁属什么的生肖hcv8jop5ns7r.cn
景泰蓝是什么hcv8jop7ns1r.cn 什么是碧玺hcv8jop9ns9r.cn 什么东西养胃hcv8jop4ns7r.cn 12月25日什么星座hcv8jop6ns7r.cn 枸杞加红枣泡水喝有什么功效hcv7jop5ns4r.cn
百度