wamp:windos环境下搭建出php的开发环境
lamp 架构包含的四个方面:
linux 系统
apache 服务器管理软件
mysql 数据库
php 语言
每种语言服务器的管理软件:
php 是 Apache
.net 是 IIS
JAVA 是 TOMCat
服务器管理软件的作用:
工作:
学习Mysql数据库:
存类型:
int整型 varchar()在括号中写字符串长度 字符串
float小数
double小数
bit 布尔型数据
日期时间类型 datetime
text 长文本
不经常用的:
money 存货币
image 存二进制数据
数据表的内容:
1.列名 类型 长度
2.主键是唯一标识一条数据的 每个表里都要有主键列 主键列是不能重复的。
3.控制列的类型( 索引)唯一索引 非空
4.外键:存在于两个表之间的关系 被引用的是主表 不被引用的是从表
关系型数据库
数据库的设计:
三大的范式
1.第一范式:保证列的原子性 拆到最小, 拆到不能拆了位置。相对于功能
2.第二范式:每一列都要和主键有关系 每一列和该表有关系
3.第三范式:每一列都要和主键有直接关系,