[Database series]-differences between views and basic tables

Source: Internet
Author: User
View definition: (User) view views View data in the database from a specific perspective, just like a table. The (inside the database system) view is a virtual table defined by a query composed of SELECT statements. Advantages of a view: the view is connected to a basic table. A view is a table created on top of a basic table. Its structure (that is, the defined column) and content

View definition: (user perspective) views View data in the database from a specific perspective, just like a table. The (inside the database system) view is a virtual table defined by a query composed of SELECT statements. Advantages of a view: the view is connected to a basic table. A view is a table created on top of a basic table. Its structure (that is, the defined column) and content

View definition:

(User perspective) The view is fromSpecific AngleTo view the data in the database, the view is like a table.

The (inside the database system) view is a virtual table defined by a query composed of SELECT statements.

Advantages of a view:

View and basic table contact:

A view is a table created on top of a basic table. Its structure (that is, the defined column) and content (that is, all data rows) come from the basic table, it exists based on the basic table. A view corresponds to one or more basic tables. A view is the abstraction of a basic table and the new relationship established in a logical sense.

Differences between a view and a basic table:

Operation: views are suitable for multi-table join browsing and are not suitable for addition, deletion, and modification.

Space: Table-physical space; view-logical existence; virtual table

Modify: The table can be modified in time; the view can only be modified by the creation statement.

Nature: view is a way to view Data Tables (a set of SQL statements)

View considerations:

A view cannot reference any other view. It can only reference a base table.

All base tables referenced by a view must be in the same database as the view, and the owner must be the same as the view.

Large data volume and multi-Table Association are required. Do not use view indexes whenever possible.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.