From a76494e16e3a2486006a3a5f10da1bd2c82329c3 Mon Sep 17 00:00:00 2001 From: mo khan Date: Sat, 15 Feb 2020 14:38:36 -0700 Subject: Draw ERD for question 1 --- Makefile | 5 ++++- assignments/3/README.md | 3 ++- assignments/3/question-1.png | Bin 0 -> 12409 bytes assignments/3/question-1.puml | 45 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 51 insertions(+), 2 deletions(-) create mode 100644 assignments/3/question-1.png create mode 100644 assignments/3/question-1.puml diff --git a/Makefile b/Makefile index a10c1ff..c5e8d32 100644 --- a/Makefile +++ b/Makefile @@ -6,10 +6,13 @@ clean : uml : plantuml assignments/**/*.puml -pdf : assignments/1/README.pdf assignments/2/README.pdf +pdf : assignments/1/README.pdf assignments/2/README.pdf assignments/3/README.pdf assignments/1/README.pdf : cd assignments/1 && pandoc --metadata title="COMP-378: Assignment 1 - mo khan (3431709)" --from=commonmark --to=html5 -s -o README.pdf README.md assignments/2/README.pdf : cd assignments/2 && pandoc --metadata title="COMP-378: Assignment 2 - mo khan (3431709)" --from=commonmark --to=html5 -s -o README.pdf README.md + +assignments/3/README.pdf : + cd assignments/3 && pandoc --metadata title="COMP-378: Assignment 3 - mo khan (3431709)" --from=commonmark --to=html5 -s -o README.pdf README.md diff --git a/assignments/3/README.md b/assignments/3/README.md index aaa0e7b..82bb312 100644 --- a/assignments/3/README.md +++ b/assignments/3/README.md @@ -11,6 +11,8 @@ Period(Date_Key, Fiscal_Period) Claim(Claim_ID, Claim_Description, Claim_Type) ``` + ![coop-insurance](./question-1.png) + * On average, there are two members for each policy and item covered by the policy. * There is an average of ten covered items per policy. * Each policy is registered and managed by only one office of the cooperative. @@ -19,7 +21,6 @@ Claim(Claim_ID, Claim_Description, Claim_Type) * The length of the fiscal period is one month. * The decision system reports are supposed to be based on five years of data. - The facts to be recorded for each combination of these dimensions are: * `Policy_Premium` diff --git a/assignments/3/question-1.png b/assignments/3/question-1.png new file mode 100644 index 0000000..9a09901 Binary files /dev/null and b/assignments/3/question-1.png differ diff --git a/assignments/3/question-1.puml b/assignments/3/question-1.puml new file mode 100644 index 0000000..7924fb5 --- /dev/null +++ b/assignments/3/question-1.puml @@ -0,0 +1,45 @@ +@startuml +!define Table(name,desc) class name as "desc" << (T,#FFAAAA) >> +!define primary_key(x) x +!define foreign_key(x) x +!define unique(x) x +!define not_null(x) x +hide methods +hide stereotypes + +' entities +Table(members, "Member") { + primary_key(member_ID) + Name + Address +} + +Table(insured_items, "InsuredItem") { + primary_key(Item_ID) + Description + Address + CoverageType +} + +Table(coop_offices, "CoopOffice") { + primary_key(Office_ID) + Address + Manager_name +} + +Table(policies, "Policy") { + primary_key(Policy_ID) + Type +} + +Table(periods, "Period") { + Date_Key + Fiscal_Period +} + +Table(claims, "Claim") { + primary_key(Claim_ID) + Claim_Description + Claim_Type +} +@enduml -- cgit v1.2.3