当前位置:网站首页>[answer] should the role with one end of the reflexive association be called "current version"
[answer] should the role with one end of the reflexive association be called "current version"
2022-06-12 00:38:00 【User 6288414】
The fifth element 2022-1-13 20:23
Mr. Pan , What is the analysis mode of this historical version , Should it be Last version and current version , Not the next version ?
( It seems strange that an organization has a version of reflexive Association , But there is a story behind it , And this is an intermediate result , Let's not expand here .—— Here is a supplementary note , Not the original Q & a content .)
UMLChina Pan Jiayu
what “ current version ”, You confuse classes with objects .
“ current version ”“ own ” You may think that reflexive association is an object's own , In fact, reflexive association also has two objects , Only two objects belong to the same set .
Do you think , If so , All reflexive associations should have a multiplicity at one end that is strictly “1”, because “ own ” There is only one .
Class diagrams are about mapping rules
for example ,
Organizations and people have a one to many relationship of employment , organization 1, Lots of people , intend :
For an organization object in the organization collection , It may employ more than one person in the person set
For a personnel object in the personnel collection , There may be... In the organization set 1 Organizations employ it
Empathy
An organization has a one to many relationship between its parent and child , The superior 1, Multiple subordinates , intend :
For an organization object in the organization collection , There may be multiple subordinate organizations in the organization set
For an organization object in the organization collection , There may be... In the organization set 1 Parent organizations
Writing code can be
class organization
{
organization The superior ;
List< organization > subordinate ;
......
}
Of course , image 1 Reflexive association to many , You can leave only one superior , When you need to find a subordinate, you can calculate the subordinate .
边栏推荐
- Experiment 7 class construction and static member function
- [academic related] it is suggested to collect. Which behaviors are academic misconduct?
- 【SignalR全套系列】之在.Net6中实现SignalR分组通信
- Optimization method of win7 FPS
- Hertzbeat v1.0 beta. 4 release, easy-to-use and friendly monitoring alarm system
- Tencent programmer roast: 1kW real estate +1kw stock +300w cash, ready to retire at the age of 35
- Jiaming's day13 of C learning -- structure and structure pointer
- The long polling processing mechanism of the service end of the # yyds dry goods inventory # Nacos configuration center
- A day when the script boy won't be killed
- Gin integrated graphic verification code
猜你喜欢

Cuiyunkai, CEO of Gewu titanium Intelligent Technology: data value jump, insight into the next generation of change forces

月份选择器禁用当月以后的数据 包含当月

Wechat applet Chinese English conversion

Month selector disable data after the current month to include the current month

Share an open source, free and powerful video player library

How much does it cost to develop s2b2c mall system

gin解决跨域问题

DPT-FSNET: DUAL-PATH TRANSFORMER BASED FULL-BAND AND SUB-BAND FUSION NETWORK FOR SPEECH ENHANCEMENT

How to cancel smart table style in WPS table

Pycharm file name taboo
随机推荐
MySQL basic tutorial -- MySQL transaction and storage engine
WPS标题段前间距设置无效解决方案
Convert VOC data format to coco data format
How to make scripts executable anywhere
Argodb 3.2 of star ring technology was officially released to comprehensively upgrade ease of use, performance and security
设计消息队列存储消息数据的 MySQL 表格
Design principle [Demeter's Law]
Breadth first search depth first search dynamic programming leetcode topic: delivering information
IP addressing overview
C language exercise: esp32 ble Low Power Bluetooth server data packaging and client data analysis
How to optimize plantuml flow diagram (sequence diagram)
Global and Chinese chromatographic silica gel resin industry research and investment direction forecast report 2022 Edition
UVM: transaction level modeling (TLM) 1.0 communication standard
DevOps落地实践点滴和踩坑记录-(1)
Openmmlab:ai CV framework
[day 6 of JUC learning] concurrent calculator and thread random factor
2021 inventory: Top 10 low code development platforms at home and abroad
730.Count Different Palindromic Subsequences
Anfulai embedded weekly report (issue 254): February 21, 2022 to February 27, 2022
手机wps如何压缩文件打包发送