Set the database type in PowerDesigner, set default value,comment, self-added properties, and the items to consider in database design, with decimal point data showing __ database

Source: Internet
Author: User
Tags powerdesigner
1.PowerDesigner Setting up the database
2. Set the self-increasing properties of the database

3. Set the default value out, will be comment also selected to


4. Matters needing attention

1, no longer one of the two tables in the library can not establish an association relationship.

2, when defining a primary key, do not use the Word ID directly, to define a meaningful word.

3, if the reference to another table, it is best not to have redundant fields.

4, IP use long type storage.

5, to define the database defaults and default length.

6, note this type of use of varchar type, do not use the text type. The recommended range is in the length of the 500~1000.

7, about the primary key, the ability to use int, you use Int. and to set up automatic growth.

8, can use the Union primary key to use the Union primary key.

9. The name definition of a primary key is best defined as a meaningful name.

5.float,double,decimal The difference between three people

float: Floating-point type, with a number of bytes as 4,32bit and a value range of -3.4e38~3.4e38 (7 valid digits)

Double: Double-precision, with a number of bytes of 8,64bit value range -1.7e308~1.7e308 (15 valid digits)

Decimal: Digital, 128bit, no precision loss, often used in bank accounts calculation. (28 valid digits)

The decimal (p,s):P is precision, S is the number of decimal digits, and the range of precision P is: 1 to 38,s range is 0 to P

The maximum number of decimal digits that can be stored by P (significant digits), including the right side of the decimal point.

S (scale) The maximum number of decimal digits that can be stored to the right of the decimal point.

So: To get the maximum number is 38 digits to the left of the decimal point is 10 of the 38-side –1, the same as the smallest-10 of 38-square + 1.


Currency value: Keep 2 as precision, for example: Decimal (13,2).

6. How to display the Vanishing toolbar

Tool-> Customize the toolbar, select Palette in the pop-up window, and click "Close" to shut down the window.

Step 1:

Step 2:

7. National that supports internationalization is also to be selected

This is only for the varchar type.

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.