当前位置:网站首页>Conceptual model design of the 2022 database of tyut Taiyuan University of Technology
Conceptual model design of the 2022 database of tyut Taiyuan University of Technology
2022-07-06 13:12:00 【Lala Lulu^_^】
Question 2
A description of a database is given in the question , Let's draw the database E-R chart , And indicate the attribute on the figure 、 The type of connection
(“ And indicate the attribute on the figure 、 The type of connection ” This sentence appears in the exam , Just treat him as if he didn't ; Because attributes are ellipses , Type is one-on-one , One to many , Many to many , These two things are paintings E-R Pictures must be drawn , In fact, from another perspective ,ER The attributes of a graph are divided into composite attributes 、 Multi valued attribute 、 Derived properties 、 Optional attribute , Contact properties , But we don't test so deep )
Talking about : This question should be a free question , I won't go into details , I believe everyone will , According to the requirements of the topic , Like high school Chinese reading , Find the entities in the topic ( Rectangle )、 Draw the properties next to the rectangle ( The ellipse ), Find out the relationship ( The diamond / The predicate in the question ) Then use according to the meaning of the topic 1、n、m Just connect , It should be noted that you should not use both adjacent many to many lines n Express , You have to use one n, One use m
Attach two examples to practice by yourself , If not, go back to the blog “ Question 1 E-R Graph to relational model ”, If you can't make a comment yet
example 1. Books in a library are stored in multiple libraries by category , For readers to borrow . There are several administrators in each library ( These administrators no longer manage other stacks ). Please design a database to store relevant information . among :
(1) The properties of the library include the library number 、 Location 、 Area etc. , The attributes of books include book numbers 、 Title 、 Publishing house, etc , The attributes of readers include reader number 、 full name 、 Unit, etc , The attributes of the administrator include employee number 、 Employee name and other attributes ; Please specify other properties by yourself .(2) The attributes that describe the borrowing relationship include lending date and return date
Try to draw the Library 、 The book 、 readers 、 Administrators and their contacts E-R chart ( It is required to indicate the relevant attributes and contact types ), And transform it into a relational pattern ( It is required to indicate the main code ).
Explain :
1. Library management database
(1) Library management database E-R The graph is as follows :
(2) The transformation to relational mode is as follows :
Library ( Library number , Address , area )
workers ( Employee number , full name , Age , Library number )
The book ( Book number , Title , author , Press. , Library number )
readers ( Reader number , full name , Company )
Borrow ( Reader number , Book number , Borrowing date , Return date )
2. Suppose a department's database contains the following information :
Employee information : Employee number 、 full name 、 Address and department .
Department Information : Department name 、 Manager's name 、 Telephone .
Product information : Product number 、 Product name 、 Price 、 model .
Manufacturer's information : Factory name 、 site of a factory 、 Fax .
In addition, it also includes information about the products sold by the Department and the products produced by the manufacturer .
Try to draw this database E-R chart ( It is required to indicate the relevant attributes and contact types ), And transform it into a relational pattern ( It is required to indicate the main code ).
Explain :
(1) database E-R The graph is as follows :
(2) The transformation to relational mode is as follows :
workers ( Employee number , full name , Address , Department name )
department ( Department name , The manager , Telephone )
product ( Product number , Product name , model , The unit price )
sales ( Department name , Product number )
Manufacturer ( Factory name , site of a factory , Fax )
production ( Product number , Factory name )
边栏推荐
- [算法] 剑指offer2 golang 面试题13:二维子矩阵的数字之和
- Music playback (toggle & playerprefs)
- Abstract classes and interfaces
- Record: the solution of MySQL denial of access when CMD starts for the first time
- One article to get UDP and TCP high-frequency interview questions!
- 记录:newInstance()过时的代替方法
- 平衡二叉树详解 通俗易懂
- 分支语句和循环语句
- Sharing ideas of on-chip transplantation based on rtklib source code
- Edit distance (multi-source BFS)
猜你喜欢
平衡二叉树详解 通俗易懂
Inheritance and polymorphism (Part 2)
Basic DOS commands
Alibaba cloud side: underlying details in concurrent scenarios - pseudo sharing
Application architecture of large live broadcast platform
Redis介绍与使用
[algorithme] swordfinger offer2 golang question d'entrevue 2: addition binaire
Introduction and use of redis
Alibaba cloud microservices (IV) service mesh overview and instance istio
Fgui project packaging and Publishing & importing unity & the way to display the UI
随机推荐
String类
TYUT太原理工大学2022数据库之关系代数小题
Error: sorting and subscript out of bounds
编辑距离(多源BFS)
TYUT太原理工大学2022数据库大题之分解关系模式
[算法] 剑指offer2 golang 面试题8:和大于或等于k的最短子数组
isEmpty 和 isBlank 的用法区别
C code implementation of robust estimation in rtklib's pntpos function (standard single point positioning spp)
服务未正常关闭导致端口被占用
What are the advantages of using SQL in Excel VBA
阿里云微服务(二) 分布式服务配置中心以及Nacos的使用场景及实现介绍
Novatel board oem617d configuration step record
Shortest Hamilton path (pressure DP)
阿里云微服务(三)Sentinel开源流控熔断降级组件
2年经验总结,告诉你如何做好项目管理
Role movement in the first person perspective
系统设计学习(一)Design Pastebin.com (or Bit.ly)
错误: 找不到符号
国企秋招经验总结
[Yu Yue education] guide business reference materials of Wuxi Vocational and Technical College of Commerce