校园二手交易平台的设计与实现ppt(基于ER图分析校园二手书交易系统)

校园二手交易平台的设计与实现ppt(基于ER图分析校园二手书交易系统)(1)

E-R模型用E-R图表示。实体是用户工作环境中所涉及的事务,属性是对实体特征的描述。

该系统的总体ER图中总共包含6个实体,分别是用户、订单、书籍、管理员、类别。

The E-R model is represented by an E-R diagram. The entity is the transaction involved in the user's work environment, and the attribute is the description of the entity's characteristics.

The overall ER diagram of the system contains a total of 6 entities, namely users, orders, books, administrators, and categories.

校园二手交易平台的设计与实现ppt(基于ER图分析校园二手书交易系统)(2)

(1)若实体间的联系是1:1

两个实体类型转换成的两个关系模式中任意一个关系模式的属性中加入另一个关系模式的键和联系类型的属性。

(2)若实体间的联系是1:N

在N端实体类型转换成的关系模式中加入1端实体类型转换成的关系模式的键和联系类型的属性。

(3)若实体间的联系是N:M

将联系转换为实体,然后在该实体上加上另外两个实体的主键,作为联系实体的主键,然后再加上该联系自身带的属性。

(1) If the connection between entities is 1:1

The attributes of any one of the two relational schemas converted by the two entity types are added with the key of the other relational schema and the attributes of the connection type.

(2) If the connection between entities is 1:N

Add the key and connection type attributes of the relational model converted from the 1-end entity type to the relational model converted from the N-end entity type.

(3) If the connection between entities is N: M

Convert the contact into an entity, and then add the primary keys of the other two entities to the entity as the primary key of the contact entity, and then add the attributes of the contact itself.

根据以上转换规则可得校园二手书交易系统的数据库设计逻辑结构为:

According to the above conversion rules, the logical structure of the database design of the campus second-hand book trading system can be obtained as:

用户(用户名,密码)

管理员(用户名,密码)

书籍(书籍ID,价格)

订单(书籍ID ,购买人,价格,数量)

User (user name, password)

Administrator (user name, password)

Books (book ID, price)

Order (book ID, purchaser, price, quantity)

素材来源:百度、知乎

翻译来源:谷歌翻译‍

,

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

    分享
    投诉
    首页