diff options
| author | mo khan <mo.khan@gmail.com> | 2020-01-06 19:46:54 -0700 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-01-06 19:46:54 -0700 |
| commit | 352a3acf7655b39b6da0ee50764e6aa02cfc6bf7 (patch) | |
| tree | 46b1ef823523a2a21157caa8c02bf2885e1421fa | |
| parent | 3c6b73811f01a5c7c08e51e710e85cc443b49155 (diff) | |
Add example of unary relationship
| -rw-r--r-- | assignments/1/README.md | 7 | ||||
| -rw-r--r-- | assignments/1/unary-relationship.png | bin | 0 -> 5601 bytes | |||
| -rw-r--r-- | assignments/1/unary-relationship.uml | 17 |
3 files changed, 24 insertions, 0 deletions
diff --git a/assignments/1/README.md b/assignments/1/README.md index a91c1e5..bb05688 100644 --- a/assignments/1/README.md +++ b/assignments/1/README.md @@ -63,6 +63,13 @@ b. Weak entity c. Unary relationship + A unary relationship is a relationship between the instances of a single entity type. + This is a self referential or recursive relationship. + + Group is subgroup of group. + +  + ### Question 3 (20 marks) As an independent consultant, you have a contract with Athabasca University to develop an application to support diff --git a/assignments/1/unary-relationship.png b/assignments/1/unary-relationship.png Binary files differnew file mode 100644 index 0000000..a2d7ecb --- /dev/null +++ b/assignments/1/unary-relationship.png diff --git a/assignments/1/unary-relationship.uml b/assignments/1/unary-relationship.uml new file mode 100644 index 0000000..91c0425 --- /dev/null +++ b/assignments/1/unary-relationship.uml @@ -0,0 +1,17 @@ +@startuml +!define Table(name,desc) class name as "desc" << (T,#FFAAAA) >> +!define primary_key(x) <b>x</b> +!define unique(x) <color:green>x</color> +!define not_null(x) <u>x</u> +hide methods +hide stereotypes + +' entities +Table(group, "group") { + primary_key(id) INTEGER + not_null(name) VARCHAR[255] +} + +' relationships +group --> group : "A group may be a sub group of another group" +@enduml |
