updated visit table links for companion1 and companion2
[eq/.git] / sql / schema.dot
1 digraph schema {
2   graph [
3     rankdir = "LR"
4   ];
5   family   [
6     label = "<f> family||<c> companionship|<n> name_id|<i> hofh_id|<e> elder_id|<vp> visit_pri|<vn> visit_notes|<v> valid"
7     shape = "record"
8   ];
9   elder   [
10     label = "<e> elder||<n> name|<p> phone|<em> email|<po> priesthood|<pr> prospective|<pp> ppi_pri|<t> ppi_notes|<ip> int_pri|<in> int_notes|<a> attending|<v> valid"
11     shape = "record"
12   ];
13   companionship   [
14     label = "<c> companionship||<e> elder|<a> aaronic|<d> district|<v> valid"
15     shape = "record"
16   ];
17   visit   [
18     label = "<v> visit||<f> family|<c> companionship|<c1> companion1|<c2> companion2|<t> date|<n> notes|<v> visited|<vt> visit_type"
19     shape = "record"
20   ];
21   interview   [
22     label = "<in> interview||<i> interviewer|<e> elder|<a> aaronic|<t> date|<n> notes|<it> interview_type"
23     shape = "record"
24   ];
25   activity   [
26     label = "<a> activity||<s> assignment|<t> date|<n> notes"
27     shape = "record"
28   ];
29   participation   [
30     label = "participation||<e> elder|<a> activity"
31     shape = "record"
32   ];
33   attendance   [
34     label = "attendance||<e> elder|<d> date"
35     shape = "record"
36   ];
37   child [
38     label = "<c> child||<f> family|<i> indiv_id|<n> name|<b> birthday|<v> valid"
39     shape = "record"
40   ]; 
41   parent        [
42     label = "<p> parent||<f> family|<n> name|<b> birthday|<p> phone|<a> address|<i>indiv_id|<v> valid"
43     shape = "record"
44   ]; 
45   aaronic       [
46     label = "<a> aaronic||<n> name|<p> phone|<em> email|<v> valid"
47     shape = "record"
48   ];
49   appointment   [
50     label = "<a> appointment||<p> presidency|<f> family|<e> elder |<d> date|<t> time|<u> uid"
51     shape = "record"
52   ];
53   assignment    [
54     label = "<a> assignment||<n> name|<c> code"
55     shape = "record"
56   ];
57   calling       [
58     label = "calling||<i> indiv_id|<n> name|<o> organization|<p> position|<s> sequence|<t> sustained"
59     shape = "record"
60   ];
61   district      [
62     label = "<d> district||<n> name|<s> supervisor|<v> valid"
63     shape = "record"
64   ];
65   presidency    [
66     label = "<p> presidency||<e> elder|<d> district|<n> name|<em> email|<pr> president|<cn> counselor|<sec> secreatary|<v> valid"
67     shape = "record"
68   ];
69   willingness   [
70     label = "<e> elder||<a> assignment|<w> willing"
71     shape = "record"
72   ];
73
74   family:c        -> companionship:c
75   companionship:e -> elder:e
76   companionship:a -> aaronic:a
77
78   appointment:e   -> elder:e
79   appointment:f   -> family:f
80
81   interview:e     -> elder:e
82   interview:i     -> elder:e
83   interview:a     -> aaronic:a
84
85   presidency:e    -> elder:e
86   presidency:d    -> district:d
87
88   willingness:e   -> elder:e
89   willingness:a   -> assignment:a
90
91   activity:s      -> assignment:a
92
93   visit:c         -> companionship:c
94   visit:f         -> family:f
95   visit:c1        -> presidency:e
96   visit:c2        -> presidency:e
97
98   participation:e -> elder:e
99   participation:a -> activity:a
100
101   attendance:e    -> elder:e
102
103   child:f         -> family:f
104   parent:f        -> family:f
105 }