领域建模
a. 阅读 Asg_RH 文档,按用例构建领域模型。
按 Task2 要求,请使用工具 UMLet,截图格式务必是 png 并控制尺寸
说明:请不要受 PCMEF 层次结构影响。你需要识别实体(E)和 中介实体(M,也称状态实体)
在单页面应用(如 vue)中,E 一般与数据库构建有关, M 一般与 store 模式 有关
在 java web 应用中,E 一般与数据库构建有关, M 一般与 session 有关
b. 数据库建模(E-R 模型)
- 按 Task 3 要求,给出系统的 E-R 模型(数据逻辑模型)
- 建模工具 PowerDesigner(简称PD) 或开源工具 OpenSystemArchitect
- 不负责的链接 http://www.cnblogs.com/mcgrady/archive/2013/05/25/3098588.html
- 导出 Mysql 物理数据库的脚本
/*==============================================================*/
/* Table: customer */
/*==============================================================*/
create table customer
(
customer_id int not null,
basket_id int,
name char(45) not null,
email_address char(45) not null,
primary key (customer_id)
);
/*==============================================================*/
/* Table: hotel */
/*==============================================================*/
create table hotel
(
hotel_id int not null,
code int,
room_id int,
hotel_name char(45) not null,
hotel_hot_index char(45) not null,
hotel_star char(45) not null,
primary key (hotel_id)
);
/*==============================================================*/
/* Table: location */
/*==============================================================*/
create table location
(
code int not null,
location_name char(45) not null,
hot char(45) not null,
primary key (code)
);
/*==============================================================*/
/* Table: reservation */
/*==============================================================*/
create table reservation
(
reservation_id int not null,
basket_id int,
"check_in data" date not null,
"check_out data" date not null,
primary key (reservation_id)
);
/*==============================================================*/
/* Table: room */
/*==============================================================*/
create table room
(
room_id int not null,
reservation_id int,
num int not null,
type char(45) not null,
list_price float(8,2) not null,
primary key (room_id)
);
/*==============================================================*/
/* Table: shoppingbasket */
/*==============================================================*/
create table shoppingbasket
(
basket_id int not null,
customer_id int,
primary key (basket_id)
);
- 简单叙说 数据库逻辑模型 与 领域模型 的异同
领域模型是对领域内的概念类或现实世界的对象的一种抽象的可视化表示,是对概念的抽象表示,包括了实体与实体之间的关系。数据库逻辑模型反映的是系统分析设计人员对数据存储的观点,是对概念模型进一步的分解和细化,在领域模型上进一步分析的结果。用户只需要关心领域模型,而数据库逻辑模型是系统分析设计人员关心的,逻辑模型的内容包括所有的实体和关系,确定每个实体的属性,定义每个实体的主键,指定实体的外键,需要进行范式化处理,逻辑模型影响着数据库的设计和实现。