系统分析与设计lesson7

领域建模

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)
);
  • 简单叙说 数据库逻辑模型 与 领域模型 的异同
    领域模型是对领域内的概念类或现实世界的对象的一种抽象的可视化表示,是对概念的抽象表示,包括了实体与实体之间的关系。数据库逻辑模型反映的是系统分析设计人员对数据存储的观点,是对概念模型进一步的分解和细化,在领域模型上进一步分析的结果。用户只需要关心领域模型,而数据库逻辑模型是系统分析设计人员关心的,逻辑模型的内容包括所有的实体和关系,确定每个实体的属性,定义每个实体的主键,指定实体的外键,需要进行范式化处理,逻辑模型影响着数据库的设计和实现。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值