菜鸟驿站仓储合理化经验(基于ER图分析菜鸟驿站包裹管理系统)

菜鸟驿站仓储合理化经验(基于ER图分析菜鸟驿站包裹管理系统)(1)

一、ER图分析

菜鸟驿站仓储合理化经验(基于ER图分析菜鸟驿站包裹管理系统)(2)

该ER模型由4个实体组成,分别是快递公司、消费者、管理员和快递查询。其中,管理员与快递公司、消费者是N:N的关系,需要将联系转换为实体,然后在该实体上加上另外两个实体的主键,作为联系实体的主键。

然后再加上该联系自身带的属性。而管理员和快递查询是1:N的关系,需要在快递查询端添加管理员的主键作为外码。由此可知,快递公司的主码是公司名称,没有外码;消费者的主码是消费者身份码,也没有外码;

管理员的主码为管理员id,也没有外码;快递查询的主码为快递单号,外码为管理员id;合作的主码为(公司名称、管理员id),外码为公司名称、管理员id;寄取的主码为(管理员id、消费者身份码),外码为管理员id、消费者身份码。

1. ER diagram analysis

The ER model consists of 4 entities, which are courier company, consumer, administrator and courier inquiry. Among them, the relationship between the administrator, the courier company and the consumer is N:N.

The relationship needs to be converted into an entity, and then the primary key of the other two entities is added to the entity as the primary key of the contact entity, and then the relationship is added. own properties.

The administrator and express query are in a 1:N relationship, and the administrator's primary key needs to be added as a foreign code on the express query end. It can be seen that the main code of the courier company has no external code;

the main code of the consumer is the consumer identity code, and there is no external code; the main code of the administrator is the administrator id, and there is no external code;

the express query The main code is the express order number, and the external code is the administrator id; the main code for cooperation is (company name, administrator id), and the external code is the company name and administrator id;

the main code sent is (administrator id, consumer id) User ID), the outer code is the administrator id, consumer ID.

二、ER图的关系模型

快递公司(公司名称、到达时间、收费价格)

消费者(消费者身份码、电话、地址信息、消费者姓名)

管理员(管理员id、姓名、登陆密码、快递用户名)

快递查询(快递单号、管理员id、收件人id、收件人电话、收件人姓名)

合作(公司名称、管理员id

寄取(管理员id、消费者身份码

Second, the relational model of ER diagram

Courier company (company name, arrival time, chargeable price)

Consumer (Consumer ID, Phone, Address Information, Consumer Name)

Administrator (admin id, name, login password, express username)

Express query (express order number, administrator id, recipient id, recipient phone number, recipient name)

Cooperation (company name, administrator id)

Send (admin id, consumer ID)

,

免责声明:本文仅代表文章作者的个人观点,与本站无关。其原创性、真实性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容文字的真实性、完整性和原创性本站不作任何保证或承诺,请读者仅作参考,并自行核实相关内容。文章投诉邮箱:anhduc.ph@yahoo.com

    分享
    投诉
    首页