Primary key Generator

Source: Internet
Author: User
1.1 Identity

Description

1. The table must support the automatic growth mechanism

2. Database Generation PRIMARY Key

3, do not need to set the primary key in the program

1.2 Assigned

Description

The value must be given in the program's Way.

PID is assigned in the program, and is used in the development environment and test environment.

1.3 Increment

Description

1. If you choose how the primary key is generated, you must be a numeric type

2, first get the maximum value of the primary key, add 1 on the basis of the maximum value, form a new primary key

3, to achieve the increased operation:

4. Low efficiency

5, the generation of the primary key is implemented by hibernate internal

1.4 Native

Different build strategies are selected based on the tables of the different databases

1.5 Uuid

Description

1. The primary key must be a varchar type

2, the primary key is generated by hibernate internally

3. Must be a string type in the Persistence class

No settings are required in the program

Primary key Generator

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.