In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. It is best not to associate more than 3 table examples with table association problems:
Payroll form a provident fund form b medical insurance form c
If there is employee number 12365 in payroll an and there is no 12365 data in table b
If the association condition is a. Work number = b. The work number (+) will make an error, after the association
Missing work number 12965 record, because table B does not have this record
It's best to use union all to put the data together.
2. it is best to use fields in the table to group, using English to encode data. If you use Chinese data, for example, grouping by name, it is easy to make mistakes, because it is possible to have the same name.
3. When associating multiple tables, an external join should be added for the correctness of the data. If it is an association of two fields, an external association is required, otherwise there will be fewer records.
When multiple tables are associated, because the data of each table is inconsistent, a table must be selected as the standard and an outer join must be used.
4. when there are many levels of views and the speed is slow, you can use to put the data in the view in the middle table.
5. In order to optimize sql statements, fuzzy queries are used as little as possible.
6 when it comes to calculating the sum of numerical data such as money, it is necessary to make a non-empty judgment, otherwise it is easy to make mistakes.
7. The function of a sequence can be used to generate the primary key of a table by defining a sequence.
8. The data source for subqueries of Update is preferably tables rather than views, because tables are much faster than views.
9. When writing a trigger, there is a situation that the surface trigger is not allowed
The reason is that table-level triggers do not allow new old.
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.