设计数据库的步骤:
1、需求分析:客户沟通需求
2、概要设计:E-R图
3、详细设计:模型图
4、代码编写--软件工程师
5、代码测试--测试工程师
6、安装部署
E-R图: 实体关系图
1)找实体-----矩形---表名2)找属性-----椭圆形--列名
3)找关系-----菱形
映射关系:
1:1
1:n
n : 1
m: n
表连接的类型:
类型1:内连接
inner join 等值
select studentname as 姓名,studentresult as 成绩
from A inner join B on A.studentno=B.studentno
类型2:外连接
select studentname as 姓名,studentresult as 成绩
from A left outer join B on A.studentno=B.studentno
select studentname as 姓名,studentresult as 成绩
from A right outer join B on A.studentno=B.studentno