Some points to note in Oracle development

Source: Internet
Author: User
1. It is best not to correlate more than 3 table examples:
Salary Table A provident Fund form b Medicare watch C
If a in the Payroll table has employee number 12365, and no 12365 data in table B
If the association condition is a. Work number =b. The work number (+) will go wrong, and the associated
The missing work number is 12965 because the B table does not have this record
It's best to put the data together with union all.
2, the best use of the table field grouping, the use of English encoding data, if the use of Chinese data prone to errors such as grouping with names, error prone, because there may be the same name
3, Multi-table Association for the correctness of the data should be added outside the connection, if the association of two fields, you need to be out of the association, otherwise it will be less recorded.
When multiple tables are associated, because each table data is inconsistent, you must select a table as the standard and use an outer join.
4, when the view level is very many, the speed is relatively slow, you can use the data in the view in the middle table
5, in order to optimize SQL statements, use less fuzzy query.
6 when it comes to calculating sums of numeric data such as money, it is necessary to make a non-null judgment, otherwise it is prone to error.
7. The function of a sequence can generate a table's primary key by defining a sequence.
8. The data source of the Update subquery is preferably a table rather than a view, because the table is much faster than the view.
9, when the trigger is written, when the surface trigger is not allowed,
The reason is that table-level triggers do not allow the use of new old.
  

Some points to note in Oracle development

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.