Creating database table statements and confusion in Visio reverse engineering

Source: Internet
Author: User
Tags modifier

First, in the Visio reverse engineering, there are several abbreviations are U1 ... N, I1 ... N

1. U stands for unique KEY

U1 represents unique key1,1 for establishing a unique key sequence ordinal

2. I stands for INDEX

I2 represents index2,2 for established index sequence number

3, "required" represents a build table with NOT NULL, cannot insert null

You can add this null or NOT NULL modifier after each field to specify whether the field can be empty (null), or you must fill in the data (not NULL). MySQL Specifies that the field is null modifier by default

Second, the database common sense

1 CREATE TABLE`[#DB_PREFIX #]Approval ' (2' ID 'int(Ten) not NULLAuto_increment,3' Type 'varchar( -)DEFAULT NULL,4' Data ' Mediumtext not NULL,5' UID 'int( One) not NULL DEFAULT '0',6' Time 'int(Ten) not NULL DEFAULT '0',7   PRIMARY KEY(' id '),8   KEY' type ' (' type '),9   KEY' uid ' (' uid '),Ten   KEY' time ' (' time ') One) ENGINE=[#DB_ENGINE #] DEFAULTCHARSET=UTF8;

Medium key is usually the index synonym. If the keyword attribute primary key is given in the column definition, then primary key can also be specified as key only. The purpose of this is to be compatible with other database systems .

Creating database table statements and confusion in Visio reverse engineering

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.