一、数据库设计过程
两个活动:
- 数据库设计(数据)
- 应用设计(功能)
本章重点关注数据库设计
- 为数据库应用设计概念模式(conceptual schema)
应用设计关注程序和连接数据库的而接口
- 通常是作为软件工程的一部分来考虑
二、例子:COMPANY数据库
我们需要根据COMPANY数据库的需求来构造数据库模式:
The company is organized into DEPARTMENTs. Each department has a name, number and an employee who manages the department. We keep track of the start date of the department manager. A department may have several locations.
公司是由部门构成的。每个部门都有一个名字、编号和管理这个部门的员工。我们还需要记录每个部门经历开始管理这个部门的起始时间。一个部门可能有多个地点。
Each department controls a number of PROJECTs. Each project has a unique name, unique number and is located at a single location.
每个部门负责多个项目。每个项目有唯一的名称、唯一的编号并位于一个单独的位置。
We store each EMPLOYEE’s social security number