最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。
The View (view) is a fake table, just a PostgreSQL statement stored in the database by the associated name.
A View is actually a combination of tables that exist in the form of a predefined PostgreSQL query.
View (views) can contain all rows of a table or select rows from one or more tables.
A View (view) can be created from one or more tables, depending on the PostgreSQL query in which the view is to be created.
A View (view) is a virtual table that allows users to implement the following:
The way in which users or user groups think it is more natural or intuitive to find structural data.
Restrict data access, and users can only see limited data, not complete tables.
Summarize the data from various tables to generate reports.
The PostgreSQL view is read-only and may not be executed on the view Used in PostgreSQL You can find it in the Create Now, here is an example from Now, you can query The results are as follows: 要删除视图,只需使用带有 The following command deletes the COMPANY_VIEW view we created earlier: DELETE 、 INSERT Or UPDATE Statement. But you can create a trigger on the view when you try DELETE 、 INSERT Or UPDATE When the view is triggered, the actions to be done are defined in the contents of the trigger. 5.37.1. CREATE VIEW (create View) ¶
CREATE VIEW Statement to create views, which can be created from one table, multiple tables, or other views. CREATE VIEW The basic syntax is as follows:CREATE [TEMP | TEMPORARY] VIEW view_name AS SELECT column1, column2..... FROM table_name WHERE [condition];
SELECT Statement contains multiple tables, which is the same as in the normal SQL SELECT The manner in the query is very similar. If you use the optional TEMP Or TEMPORARY Keyword, the view is created in the tempdb. 5.37.2. Example ¶
COMPANY 表( 下载 COMPANY SQL 文件 ), the data are as follows:runoobdb# select * from COMPANY; id | name | age | address | salary ----+-------+-----+-----------+-------- 1 | Paul | 32 | California| 20000 2 | Allen | 25 | Texas | 15000 3 | Teddy | 23 | Norway | 20000 4 | Mark | 25 | Rich-Mond | 65000 5 | David | 27 | Texas | 85000 6 | Kim | 22 | South-Hall| 45000 7 | James | 24 | Houston | 10000 (7 rows)
COMPANY Table creates an instance of the view. The view is only from COMPANY Select several columns from the table:runoobdb=# CREATE VIEW COMPANY_VIEW AS SELECT ID, NAME, AGE FROM COMPANY;
COMPANY_VIEW Similar to the way you query the actual table Here is an example:runoobdb# SELECT * FROM COMPANY_VIEW;
id | name | age ----+-------+----- 1 | Paul | 32 2 | Allen | 25 3 | Teddy | 23 4 | Mark | 25 5 | David | 27 6 | Kim | 22 7 | James | 24 (7 rows)
5.37.3. DROP VIEW (Delete View) ¶
view_name 的 DROP VIEW 语句。 DROP VIEW 的基本语法如下:runoobdb=# DROP VIEW view_name;
runoobdb=# DROP VIEW COMPANY_VIEW;