Non-update principles in Oracle Database Design

Source: Internet
Author: User

The non-update principle in Oracle Database Design when adding data, if the new logic involves the original information, try not to update the data. Www.2cto.com. What kind of situation will there be such a problem? For example, a user places an order. If you have purchased orders in the past, this order will be discounted, but the original order can only be discounted once at a time. A-> B-> C has two design methods. As shown in the preceding figure, orders A are at A discount based on orders B and orders B are at A discount based on orders C. Www.2cto.com first, add a Peugeot field. If yes, update this field to 1. Second, add an order field used last time, and remove it twice during query. Remove records that were not empty for the last use order, and remove data that was filled in the field of the last use order. The first query is friendly, and the second query is performance friendly. Based on the non-update principle, we chose the second method. For complex queries, we should submit them to the report library for processing.
 

Related Article

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.