当前位置:网站首页>Data view for gbase 8s

Data view for gbase 8s

2022-06-25 04:33:00 Eight delicacies tofu

         Views are virtual tables defined by queries stored in the database (Virtual Table). The query corresponding to a view is called a view definition , It specifies how to start from one or several basic tables (Base Table) Exporting views from . Only the definition of the view is stored in the database , Do not store the data corresponding to the view , The data is still stored in the basic table of the exported view . Modify the data in the basic table , The data in the corresponding view also changes . The view is like a window , Through it, you can see the data you are interested in in in the database .

         stay SQL in , Defining views is the basic means to design out of database schemas . Views can provide the following advantages for database systems .

1. Logical independence of data

         When the schema structure of the database changes , Just adjust the mapping relationship from external schema to schema , There is no need to change the definition of external mode . The purpose of this is to ensure that the user's application does not have to be rewritten . View as virtual table , Its definition is actually the mapping from external schema to schema . With the view , Without changing the basic table structure , This mapping relationship can be updated only by modifying the definition of the view , So as to realize the logical independence of data .

2. Simplification of user operation

         In a real database system , The structure and connection of all basic tables are often very complex . Usually users in different departments are only interested in a part of the data in the database . The view mechanism just meets the needs of users . Define views for different users , Enables users to focus on the data they care about , All the user does is query the virtual table , How to get this virtual table , Users do not need to understand .

3. Data security protection

         The view mechanism can also provide certain security protection functions for data , Only give users access to views , Basic tables that are confidential to users do not define views for them . In this way, users can only access the part of data they need through the view , Without affecting other data .

原网站

版权声明
本文为[Eight delicacies tofu]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206250244318515.html