1、 领域建模
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 物理数据库的脚本
- 简单叙说 数据库逻辑模型与领域模型的异同
Mysql 物理数据库的脚本:
/*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 2018/4/29 20:39:03 */
/*==============================================================*/
drop table if exists CreditCard;
drop table if exists Hotel;
drop table if exists Payment;
drop table if exists Reservation;
drop table if exists Room;
drop table if exists Traveler;
/*==============================================================*/
/* Table: CreditCard */
/*==============================================================*/
create table CreditCard
(
CardNumber bigint not null,
Owner text,
Type text not null,
Password bigint not null,
primary key (CardNumber)
);
/*==============================================================*/
/* Table: Hotel */
/*==============================================================*/
create table Hotel
(
NameOfHotel text not null,
Location text,
primary key (NameOfHotel)
);
/*==============================================================*/
/* Table: Payment */
/*==============================================================*/
create table Payment
(
TotalBill decimal not null,
TypeOfPay decimal not null,
Detals text not null
);
/*==============================================================*/
/* Table: Reservation */
/*==============================================================*/
create table Reservation
(
HotelName text not null,
Date date not null,
RoomNumber decimal not null,
NumberOfTraveler char(10),
primary key (HotelName)
);
/*==============================================================*/
/* Table: Room */
/*==============================================================*/
create table Room
(
NumberOfRoom decimal not null,
Price decimal not null,
TypeOfRoom int not null,
primary key (NumberOfRoom)
);
/*==============================================================*/
/* Table: Traveler */
/*==============================================================*/
create table Traveler
(
Name text not null,
emailaddress text not null,
primary key (emailaddress)
);
数据库逻辑模型与领域模型的异同:
领域模型是对领域内的概念类或现实世界中对象的可视化表示。又称概念模型、领域对象模型、分析对象模型。它专注于分析问题领域本身,发掘重要的业务领域概念,并建立业务领域概念之间的关系。
数据库建模:在设计数据库时,对现实世界进行分析、抽象、并从中找出内在联系,进而确定数据库的结构,这一过程就称为数据库建模。它主要包括两部分内容:确定最基本的数据结构;对约束建模。
数据模型是系统设计,以及实现的一部分,描述的是对用户需求在技术上的实现方法。用户不需要关心系统的数据模型,但是必须关注领域模型,因为领域模型反映的是问题域的相关业务概念以及其关系,领域模型是用户业务描述的高度抽象,来源于业务需求的描述,同时又可以帮助用户和需求分析人员更好的理解业务需求。