程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Master data types of learning notes for Python introductory development

編輯:Python

The point of this section

  • Master data types

The duration of this section needs to be controlled 5 Within minutes

Introduce

The storage engine determines the type of table , The data stored in the table should have different types , Each data type has its own width , But the width is optional

A detailed reference :

  • http://www.runoob.com/mysql/mysql-data-types.html
  • http://dev.mysql.com/doc/refman/5.7/en/data-type-overview.html

mysql Overview of common data types

#1\. Numbers :
integer :tinyinit int bigint
decimal :
float : Imprecise in the case of short digits
double : Imprecise in the case of long digits
0.000001230123123123
Deposit :0.000001230000
decimal:( If you use a decimal , Use the recommended decimal)
accurate
The internal principle is to store in string form
#2\. character string :
char(10): Simple and crude , Waste space , Fast access
root Deposit root000000
varchar: accurate , Save a space , Slow access
sql Optimize : Create table time , Put the fixed length type forward , Put it back longer
Like gender Such as address or description information
>255 Characters , If it is over, the file path will be stored in the database .
Such as the picture , Video etc. find a file server , Only paths or url.
#3\. Time type :
The most commonly used :datetime
#4\. Enumeration type and collection type

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved