MySQL Database basics

Source: Internet
Author: User

Common types:
int integral type
float decimal
Double decimal
varchar (20) string parentheses inside is the length of the write string only the string has parentheses
Bit Boolean type data
DateTime Date-Time type
Text Long

Infrequently used types:
Money Deposit Currency
Image storage Binary Data

Data sheet:
1. Column name Type length
2. Primary key Each table must have a primary key column is not repeatable, is able to uniquely identify a piece of data
3. Type of control column (index): 1. Unique index (cannot be duplicated) 2. Non-empty
4. A foreign key exists in relation to two tables

Relational database: Because there are all these relationships in the database, the database is also called a relational database.

Design of the database:
The three main paradigms of database design:
1. First paradigm: Guaranteeing the atomicity of columns
That is, when the data table is written column is split until it can no longer be removed (relative to the program function).
Like what:
Zhangdian District, Zibo, Shandong Province
Zhangdian District, Zibo, Shandong Province

2. Second paradigm: Each column is related to the primary key
In fact, the time is: Each column is related to the table.

3. The third paradigm: Each column is directly related to the primary key

MySQL Database basics

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.