In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article focuses on "what are the differences between mysql views and tables". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Now let the editor take you to learn "what are the differences between mysql views and tables"?
Differences: 1, the view is a compiled sql statement, but the table is not; 2, the view has no actual physical record, but the table has; 3, the table is the content, and the view is the window; 4, the table occupies physical space, while the view is only the existence of logical concepts, not the physical space; 5, the table is the inner schema, the view is the outer schema; 6, the table belongs to the global mode, the view belongs to the local mode.
The operating environment of this tutorial: windows7 system, mysql8 version, Dell G3 computer.
What is the MySQL view?
A MySQL view (View) is a virtual table. Like a real table, a view is made up of columns and rows, but the view does not actually exist in the database. The data for rows and columns comes from the table used in the query that defines the view and is dynamically generated when the view is used.
Only the definition of the view is stored in the database, but there is no data in the view, which is stored in the real table referenced by the query of the defined view. When you query data using a view, the database fetches the corresponding data from the real table. Therefore, the data in the view depends on the data in the real table. Once the data in the real table changes, so does the data displayed in the view.
The difference between mysql views and tables
1. The view is a compiled sql statement; the table is not.
2. The view has no actual physical record; the table does.
3. the table is the content and the view is the window
4. the table occupies physical space, but the view does not take up physical space, and the view is only the existence of logical concepts; the table can be modified in time, but the view can only be modified by the statement created.
5. The table is the inner mode and the view is the outer mode
6. The table belongs to the table in the global schema and is the real table, while the view belongs to the table in the local schema and is a virtual table.
7. The establishment and deletion of the view only affect the view itself, not the corresponding basic table.
Relationship between mysql view and table
A view is a table built on top of a base table, whose structure (that is, the defined columns) and contents (that is, all data rows) are derived from the base table, and it exists according to the existence of the base table. A view can correspond to either one base table or multiple base tables. Views are abstractions of basic tables and new relationships established in a logical sense.
At this point, I believe you have a deeper understanding of "what is the difference between mysql views and tables". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.