当前位置:网站首页>TYUT太原理工大学2022数据库大题之概念模型设计
TYUT太原理工大学2022数据库大题之概念模型设计
2022-07-06 09:19:00 【啦啦噜噜^_^】
题型二
题中给出对某数据库的一段描述,让画该数据库的E-R图,并在图上注明属性、联系的类型
(“并在图上注明属性、联系的类型”考试出现这句话,就当他没有;因为属性就是椭圆,类型就是一对一,一对多,多对多,这两个东西都是画E-R图必画的,其实从另一个角度考虑,ER图的属性分为复合属性、多值属性、派生属性、可选属性,联系属性,但咱们不考这么深)
浅谈:这道题应该是个送分题,我就不细讲了,相信大家都会,就是根据题目要求,像高中语文阅读一样,找出题目中的实体(长方形)、画长方形旁边的属性(椭圆),找出关系(菱形/题中的谓语)再根据题意用1、n、m连线就好啦,要注意的是相邻多对多的两条线你不要都用n表示,你得一个用n,一个用m

附两道例题自己练练手,要是还不会就返回去看博客“题型一E-R图转关系模式”,要是还不会就发评论吧
例1. 某图书馆中图书按类分别存放在多个书库中,可供读者借阅。每个书库中有若干个管理员(这些管理员不再管理其它书库)。请设计一个数据库保存相关的信息。其中:
(1)书库的属性包括书库编号、位置、面积等, 图书的属性包括书号、书名、出版社等,读者的属性包括读者号、姓名、单位等,管理员的属性包括职工编号、职工姓名等属性;其它属性请自己指定。(2)描述借阅关系的属性包括借出日期和应还日期等
试画出书库、图书、读者、管理员及其联系的E-R图(要求注明相关属性及联系的类型), 并将其转换成关系模式(要求注明主码)。
解:
1. 图书管理数据库
(1)图书管理数据库E-R图如下:

(2)转换为关系模式如下:
书库(书库编号,地址,面积)
职工(职工编号,姓名,年龄,书库编号)
图书(图书编号,书名,作者,出版社,书库编号)
读者(读者编号,姓名,单位)
借阅(读者编号,图书编号,借书日期,还书日期)
2. 假设一个部门的数据库包括如下信息:
职工的信息:职工号、姓名、地址和所在部门。
部门的信息:部门名称、经理名、电话。
产品的信息:产品编号、产品名、价格、型号。
制造商的信息:厂称、厂址、传真。
另外还包括部门销售产品的信息和制造商生产产品的信息。
试画这个数据库的E-R图(要求注明相关属性及联系的类型), 并将其转换成关系模式(要求注明主码)。
解:
(1)数据库E-R图如下:

(2)转换为关系模式如下:
职工(职工号,姓名,地址,部门名称)
部门(部门名称,经理,电话)
产品(产品编号,产品名,型号,单价)
销售(部门名称,产品编号)
制造商(厂名,厂址,传真)
生产(产品编号,厂名)
边栏推荐
- [rtklib 2.4.3 B34] version update introduction I
- 继承和多态(下)
- 一文搞定 UDP 和 TCP 高频面试题!
- Novatel board oem617d configuration step record
- Comparative analysis of the execution efficiency of MySQL 5.7 statistical table records
- [algorithm] sword finger offer2 golang interview question 3: the number of 1 in the binary form of the first n numbers
- Sharing ideas of on-chip transplantation based on rtklib source code
- 3月15号 Go 1.18 正式版发布 了解最新特色以及使用方法
- [算法] 剑指offer2 golang 面试题10:和为k的子数组
- [算法] 剑指offer2 golang 面试题3:前n个数字二进制形式中1的个数
猜你喜欢

抗差估计在rtklib的pntpos函数(标准单点定位spp)中的c代码实现

C code implementation of robust estimation in rtklib's pntpos function (standard single point positioning spp)

3月15号 Go 1.18 正式版发布 了解最新特色以及使用方法

Wechat applet development experience

How do architects draw system architecture blueprints?

阿里云微服务(三)Sentinel开源流控熔断降级组件

Chromatic judgement bipartite graph

MySQL 30000 word essence summary + 100 interview questions, hanging the interviewer is more than enough (Collection Series
![[algorithm] sword finger offer2 golang interview question 12: the sum of the left and right sub arrays is equal](/img/11/ee0628a68542236fc641966579a31a.png)
[algorithm] sword finger offer2 golang interview question 12: the sum of the left and right sub arrays is equal

10 minutes pour maîtriser complètement la rupture du cache, la pénétration du cache, l'avalanche du cache
随机推荐
Application architecture of large live broadcast platform
The earth revolves around the sun
抗差估计在rtklib的pntpos函数(标准单点定位spp)中的c代码实现
[dry goods] cycle slip detection of suggestions to improve the fixed rate of RTK ambiguity
[算法] 剑指offer2 golang 面试题2:二进制加法
闇の連鎖(LCA+树上差分)
How to reduce the shutdown time of InnoDB database?
Error: symbol not found
微信小程序开发心得
Problems and solutions of robust estimation in rtklib single point location spp
使用rtknavi进行RT-PPP测试
Pride-pppar source code analysis
2-year experience summary, tell you how to do a good job in project management
2022 National Games RE1 baby_ tree
系统设计学习(三)Design Amazon‘s sales rank by category feature
[algorithm] sword finger offer2 golang interview question 2: binary addition
Fairygui loop list
Record: the solution of MySQL denial of access when CMD starts for the first time
架构师怎样绘制系统架构蓝图?
[algorithm] sword finger offer2 golang interview question 4: numbers that appear only once