当前位置:网站首页>[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 .
边栏推荐
- Detailed explanation of merge sorting
- Sword finger offer 09 Implementing queues with two stacks
- Experiment 7 class construction and static member function
- The long polling processing mechanism of the service end of the # yyds dry goods inventory # Nacos configuration center
- Breadth first search depth first search dynamic programming leetcode topic: delivering information
- 出门带着小溪
- 一、Flutter 入门学习写一简单客户端
- OpenMMLab:AI CV框架
- Exploration of qunar risk control safety products
- Win jar package setting boot auto start
猜你喜欢

Optimization method of win7 FPS
![[case] building a universal data lake for Fuguo fund based on star ring technology data cloud platform TDC](/img/62/e53a83f04a5eab7ae4db47e8d4f3e5.jpg)
[case] building a universal data lake for Fuguo fund based on star ring technology data cloud platform TDC

出门带着小溪

How to package and send compressed files for mobile WPS

win10文件夹状态红叉表示的是什么

时间选择器样式错乱 中间文字被遮挡

At the digital data nextionbi online conference, traditional enterprises showed their in-depth understanding of data analysis

详解异步任务:函数计算的任务触发去重

Seven trends in test automation that need attention

Characteristics of JS logical operators
随机推荐
Is the o2o platform worth doing in 2022
Experiment 6 constructor + copy construction
How to optimize plantuml flow diagram (sequence diagram)
统一认证中心 Oauth2 高可用坑
Cuiyunkai, CEO of Gewu titanium Intelligent Technology: data value jump, insight into the next generation of change forces
[foreign enterprise test interview and written examination] share the whole process of 8 rounds of 30k+ foreign enterprise interview
DPT-FSNET: DUAL-PATH TRANSFORMER BASED FULL-BAND AND SUB-BAND FUSION NETWORK FOR SPEECH ENHANCEMENT
Visitors push e-commerce express without tossing about personal payment codes
Pass the command parameters for operating mongodb to Mongo in the shell
Flutter 使用本地图片
The road of global evolution of vivo global mall -- multilingual solution
[academic related] it is suggested to collect. Which behaviors are academic misconduct?
验证码是自动化的天敌?看看阿里P7大神是怎么解决的
Bgfx multithreaded rendering
Flutter uses local pictures
LabVIEW Arduino电子称重系统(项目篇—1)
Cube technology interpretation | detailed explanation of cube applet Technology
C语言练习:ESP32 BLE低功耗蓝牙服务端数据打包和客户端数据解析
repeat_ L2-007 family property_ set
详解异步任务:函数计算的任务触发去重