2016/5/8 Database 2

Source: Internet
Author: User

Database integrity: Reliable + accurate = integrity

Database integrity: Entities: Ensure that each row has a data field: A column of data references: Guaranteed numbering customization: ensure your own rules

Primary key: Ensures that each row of Entity data can be differentiated without identical data

Constraint: Name format primary key set Primary key

UNIQUE constraint: Column values can only be unique nullable can be multiple unique names format unique NOT NULL

Non-empty constraint: NOT null (cannot be null)

Default constraint: "input constraint" Null is also assumed to be a value

Check constraint: Check (gender=1 or (or meaning here) gender=0)

FOREIGN KEY constraint: A constraint foreign key that links to an external table is a dependency on a primary key that is a new constraint imposed by a foreign key

Constraint established foreign Key name foreign key (the key to be connected in this table must be the same as the primary key attribute that needs to be connected, such as: int int) references the table name of the connection (the table's primary key name)

2016/5/8 Database 2

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.