diff options
| author | mo khan <mo.khan@gmail.com> | 2020-01-06 19:32:49 -0700 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-01-06 19:32:49 -0700 |
| commit | 3f704b083ba6c9f2e836add0604c0ce1c355a61d (patch) | |
| tree | c24d750137e7fb27ba7bcea87cef661b73fb115f | |
| parent | 06ec89c29b781937184721bd7e3648d2fa5ac7ff (diff) | |
Add an example of a weak entity
| -rw-r--r-- | assignments/1/README.md | 11 | ||||
| -rw-r--r-- | assignments/1/weak-entity.yml | 14 | ||||
| -rwxr-xr-x | bin/uml | 2 |
3 files changed, 26 insertions, 1 deletions
diff --git a/assignments/1/README.md b/assignments/1/README.md index 1929ff0..a91c1e5 100644 --- a/assignments/1/README.md +++ b/assignments/1/README.md @@ -50,6 +50,17 @@ a. Associative entity  b. Weak entity + + A strong entity is a type of entity that exists independent of any other entity types. + A weak entity is a type of entity that exists when some other type exists so it is dependent on an identifying owner. + + Customer (id, name) + Address(id, customer_id, street, city, country) + + Customer --<- Dependent + +  + c. Unary relationship ### Question 3 (20 marks) diff --git a/assignments/1/weak-entity.yml b/assignments/1/weak-entity.yml new file mode 100644 index 0000000..ff5b968 --- /dev/null +++ b/assignments/1/weak-entity.yml @@ -0,0 +1,14 @@ +@startuml +entity "Customer" as customer { + *id: number + *name: varchar(255) +} +entity "Address" as address { + *id: number + *customer_id: number + *street: varchar(255) + *city: varchar(255) + *country: varchar(255) +} +customer ||..|{ address +@enduml @@ -1,3 +1,3 @@ #!/bin/sh -plantuml assignments/1/associative-entity.uml +plantuml assignments/1/*.uml |
