mysql
将一张表拆分成多张表并关联起来
将可拆信息拆分出来构建新表
命令行操作数据库
创建数据库
create database examination;
删除数据库
drop database examination;
指定字符集和校对集,
create database examination default charset utf8mb4 collate
utf8mb4_general_ci;
table表:
创建表格
CREATE TABLE 'class' (
'id' int(11) unsigned NOT NULL AUTO_INCREMENT,
'name' varchar(88) NOT NULL,
PRIMARY KEY ('id')
);
(1)class
mysql> desc class;
+-------+-----------------+-------+-------+----------+--------+
| Field | Type | Null | Key | Default | Extra |
+-------+-----------------+--------+-------+---------+--------+
| id | int(11) | NO | PRI | NULL | |
| name | varchar(80) | NO | | NULL | |
+--------+-----------------+--------+-------+---------+--------+
2 rows in set (0.00 sec)
mysql> select * from class;
+----+----------+
| id | name |
+----+----------+
| 1 | 高一一班 |
| 2 | 高一二班 |
| 3 | 高一三班 |
+----+----------+
3 rows in set (0.00 sec)
小数转二进制
3 --> 二进制 11 整数部分
0.4 -->二进制 0.5*0 + 0.25*1 + 0.125*1
mysql 数据类型: http://www.runoob.com/mysql/mysql-data-types.html