-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhi.tex
125 lines (94 loc) · 2.89 KB
/
hi.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
\documentclass{article}
\usepackage{listings}
\title{Information Management CA Report}
\author{Matthew Power}
\date{November 2024}
\begin{document}
\maketitle
\tableofcontents
\section{Introduction}
This is the first section.
\section{7 Step Algorithm}
The chosen ER model attempts to model a simple army. This model does not intend to be fully
accurate but will contain some of the actual names of leaders/generals for the model.
Many assumptions were made as a lot of aspects of the organization is not public for obvious reasons.
From the report of the commission of the defense forces, there are diagrams of their proposed
future command structure which the ER model will be based on.
\section{Code}
\begin{lstlisting}
Create table soldier (
fname text,
lname text,
service_num int,
sex text,
curr_rank text,
salary int,
DOB date,
address text,
wounds text,
Unum int,
primary key(service_num),
foreign key (Unum) references unit(unumber)
);
Create table unit (
uname text,
unumber int,
uhq text,
leader_sn int,
leader_startdate date,
primary key (unumber),
foreign key (leader_sn) references soldier(service_num)
);
create table branch (
bname text,
bnumber int,
bhq int,
commander_sn int,
commander_startdate date,
primary key (bnumber),
foreign key (commander_sn) references soldier(service_num)
);
create table controls (
branchnum int,
opnumber int,
months int,
foreign key (branchnum) references branch(bnumber),
foreign key (opnumber) references operation(Onumber)
);
create table operation (
oname text,
onumber int,
mainopnum int,
primary key (onumber)
);
create table dependant (
dep_name text,
soldierSN int,
addressline text,
phone_number int,
relationship text,
foreign key (soldiersn) references soldier(service_num)
);
create table baselocations (
branchnum int,
blocation text,
foreign key(branchnum) references branch(bnumber)
);
create table oplocations (
branchnum int,
blocation text,
foreign key(branchnum) references branch(bnumber)
);
create table wounds (
soldier_servicenum int,
wound text,
operationnum int,
foreign key (soldier_servicenum) references soldier(service_num),
foreign key (operationnum) references operation(onumber)
);
alter table unit
add primary key (unumber)
alter table soldier
add foreign key (Unum) references unit(unumber)
\end{lstlisting}
\end{document}