当前位置:网站首页>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 )
边栏推荐
- [algorithm] sword finger offer2 golang interview question 10: subarray with sum K
- Error: sorting and subscript out of bounds
- [algorithm] sword finger offer2 golang interview question 4: numbers that appear only once
- How do architects draw system architecture blueprints?
- Sharing ideas of on-chip transplantation based on rtklib source code
- What are the advantages of using SQL in Excel VBA
- Fgui project packaging and Publishing & importing unity & the way to display the UI
- 雇佣收银员【差分约束】
- TYUT太原理工大学2022软工导论简答题
- Usage differences between isempty and isblank
猜你喜欢
Design a key value cache to save the results of the most recent Web server queries
Interview Essentials: talk about the various implementations of distributed locks!
Heap sort [handwritten small root heap]
On March 15, the official version of go 1.18 was released to learn about the latest features and usage
继承和多态(上)
Dark chain lock (lca+ difference on tree)
[GNSS data processing] Helmert variance component estimation analysis and code implementation
一文搞定 UDP 和 TCP 高频面试题!
[algorithm] sword finger offer2 golang interview question 5: maximum product of word length
阿里云微服务(二) 分布式服务配置中心以及Nacos的使用场景及实现介绍
随机推荐
架构师怎样绘制系统架构蓝图?
记录:动态Web项目servlet访问数据库404错误之解决
【话题终结者】
4.30 dynamic memory allocation notes
图书管理系统小练习
堆排序【手写小根堆】
错误:排序与角标越界
阿里云微服务(一)服务注册中心Nacos以及REST Template和Feign Client
First acquaintance with C language (Part 2)
[算法] 剑指offer2 golang 面试题4:只出现一次的数字
MYSQL索引钟B-TREE ,B+TREE ,HASH索引之间的区别和应用场景
系统设计学习(二)Design a key-value cache to save the results of the most recent web server queries
10 minutes pour maîtriser complètement la rupture du cache, la pénétration du cache, l'avalanche du cache
Fairygui bar subfamily (scroll bar, slider, progress bar)
How to ensure data consistency between MySQL and redis?
Inheritance and polymorphism (I)
Tyut Taiyuan University of technology 2022 introduction to software engineering examination question outline
Chromatic judgement bipartite graph
First acquaintance with C language (Part 1)
平衡二叉树详解 通俗易懂