Autoinc, default, and batchupdate

Source: Internet
Author: User

In the C/S architecture, we like to use the integer field of autoinc as the oId during data logging design, and also like to set some default values in the data logging, it turns out that there is no problem.

However, in 3-tier (using tclientdataset) or batchupdate mode, because these resources must be submitted before being produced by DBMS, so there will be some problems:

1. for master-detail, after the master record is added, in order to ensure the integrity of the credential, the master must be saved in a transaction at the same time, so when the primary table is not saved, add the detail information. What is the value of the detail outer limit?

2. After submitting the information, do you need merge or requery if you have not seen the DBMS-generated autoinc or default data? Will this activity allow customers to face up? Do you remember to jump out before closing?

My suggestion is not to define these things in terms of data, as more and more people will not define the relationship in the data definition table. The OID uses the newly added OID component to handle the problem on its own (it must be measured in numbers). Each time it is added, a new sequence is generated. As of default, you can fill in the statement according to the design text before submission. You can also manage the data dictionary in a unified way with the constraint.

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: 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.