dbms数据库管理系统_数据库管理系统(DBMS)中的视图
dbms數據庫管理系統
DBMS College professor once realized that students feel sad when they see their friend's marks higher than them and it creates a negative impact on them. It gave the Professor an idea to create a view table in his student academic result database.
DBMS學院的教授曾經意識到,當學生看到朋友的標記比他們高時會感到難過,這會對他們產生負面影響。 這給了教授一個想法, 可以在他的學生學術成績數據庫中創建視圖表 。
In the database, View is a virtual table that combines the result set of a stored query. It is very important when we want to restrict a certain user from accessing the entire database. View is dynamic and can be computed from the data in the database. Changing the data in a table alters the data shown in the view as well.
在數據庫中, View是一個虛擬表,它結合了存儲查詢的結果集 。 當我們想限制某個用戶訪問整個數據庫時,這一點非常重要。 視圖是動態的,可以根據數據庫中的數據進行計算。 更改表中的數據也會更改視圖中顯示的數據。
When the Professor applies this technique, the student got to see their marks only and thus create a positive impact on the students as they are now competing with the one person only, themselves.
當教授應用此技術時,學生只能看到自己的標記,從而對學生產生積極的影響,因為他們現在僅與一個人自己競爭。
In a relational database, a view is not the part of a relational schema.
在關系數據庫中, 視圖不是關系模式的一部分。
1.創建視圖 (1. Create view)
Syntax to create a view:
創建視圖的語法:
create or replaceview view_nameasselect column_name1, column_name2,...from table_namewhere condition;Example:
例:
Suppose, we have to create a student view table of view10.
假設我們必須創建一個view10的學生視圖表。
create view view10 select marks from student where rollno = 10;2.放下視圖 (2. Drop View)
Syntax to drop a view:
刪除視圖的語法:
drop view viewname;Example:
例:
If view10 table has to be dropped, the command looks like:
如果必須刪除view10表,則命令如下所示:
drop view view10;DBMS中視圖的優點 (Advantages of a view in DBMS)
Views can subset the data in a table.
視圖可以將表中的數據子集化。
Views can join and simplify the tables in a virtual table.
視圖可以聯接并簡化虛擬表中的表。
Views do not require additional storage.
視圖不需要額外的存儲。
Views can hide the complexity of the database and the data the user must hide that.
視圖可以隱藏數據庫的復雜性以及用戶必須隱藏的數據。
Views can act as aggregated tables where aggregated data (sum, average, etc.) are calculated and presented as part of data.
視圖可以用作匯總表,在匯總表中計算匯總數據(總和,平均值等)并將其顯示為數據的一部分。
Views can provide additional security from unauthorized users and unauthorized access.
視圖可以為未經授權的用戶和未經授權的訪問提供額外的安全性。
DBMS中視圖的缺點 (Disadvantages of a view in DBMS)
Database view may be slow if it is approved from a view table that is generated from another view.
如果從另一個視圖生成的視圖表中批準了數據庫視圖,則數據庫視圖可能會變慢。
翻譯自: https://www.includehelp.com/dbms/views-in-dbms.aspx
dbms數據庫管理系統
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎總結
以上是生活随笔為你收集整理的dbms数据库管理系统_数据库管理系统(DBMS)中的视图的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: duration java_Java D
- 下一篇: 操作系统大内核和微内核_操作系统中的内核