系统分析与设计第五次作业

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 11:43:57                           */
/*==============================================================*/


drop table if exists Customer;

drop table if exists address;

drop table if exists hotel;

drop table if exists reservation;

drop table if exists room;

/*==============================================================*/
/* Table: Customer                                              */
/*==============================================================*/
create table Customer
(
   name                 varchar(24),
   phone                varchar(11),
   email                varchar(24)
);

/*==============================================================*/
/* Table: address                                               */
/*==============================================================*/
create table address
(
   name                 varchar(24)
);

/*==============================================================*/
/* Table: hotel                                                 */
/*==============================================================*/
create table hotel
(
   name                 varchar(24),
   comment              longtext
);

/*==============================================================*/
/* Table: reservation                                           */
/*==============================================================*/
create table reservation
(
   "customer name"      varchar(24),
   "customer phone"     varchar(11),
   "customer email"     varchar(24),
   "room name"          varchar(24),
   "room price"         int,
   date                 date
);

/*==============================================================*/
/* Table: room                                                  */
/*==============================================================*/
create table room
(
   name                 varchar(24),
   "number of people"   int,
   price                int,
   comment              longtext
);

alter table address add constraint FK_locate foreign key ()
      references hotel on delete restrict on update restrict;

alter table hotel add constraint FK_choose foreign key ()
      references Customer on delete restrict on update restrict;

alter table reservation add constraint FK_make foreign key ()
      references Customer on delete restrict on update restrict;

alter table room add constraint FK_contains foreign key ()
      references hotel on delete restrict on update restrict;

alter table room add constraint FK_include foreign key ()
      references reservation on delete restrict on update restrict;

简单叙说 数据库逻辑模型 与 领域模型 的异同

领域模型(Domain Model)是一个商业建模范畴的概念,他和软件开发并无一丝一毫的关系,即使一个企业他不开发软件,他也具备他的业务模型,所有的同行业的企业他们的业务模型必定有非常大的共性和内在的规律性,由这个行业内的各个企业的业务模型再向上抽象出来整个行业的业务模型.

数据库逻辑模型反映的是系统分析设计人员对数据存储的观点,是对概念数据模型进一步的分解和细化。逻辑数据模型是根据业务规则确定的,关于业务对象、业务对象的数据项及业务对象之间关系的基本蓝图。
数据库逻辑模型的内容包括所有的实体和关系,确定每个实体的属性,定义每个实体的主键,指定实体的外键,需要进行范式化处理。 数据库逻辑模型的目标是尽可能详细的描述数据,但并不考虑数据在物理上如何来实现。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值