Skip to content

Commit 6a3cd21

Browse files
Add the 'Position' table
1 parent f330185 commit 6a3cd21

File tree

2 files changed

+57
-28
lines changed

2 files changed

+57
-28
lines changed

README.md

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div style="font-size: 1em;">
22

3-
Last updated on 2021-12-06 09:33:01
3+
Last updated on 2021-12-08 21:43:46
44

55
</div>
66

@@ -54,23 +54,20 @@ code and show it running on their machine.
5454
Shown below are three tables from a relational database conceptual data
5555
model.
5656

57-
<div style='float: left; margin-right: 1em;'>
57+
<div style='float: left; margin: 0 1em 0 1em;'>
5858

5959
<table class="table table-bordered table-striped table-hover table-condensed table-responsive" style="width: auto !important; margin-left: auto; margin-right: auto;">
6060
<thead>
6161
<tr>
62-
<th style="text-align:left;color: white !important;background-color: gray !important;font-size: 20px;"> Employee </th>
62+
<th style="text-align:left;color: white !important;background-color: gray !important;font-size: 20px;"> Company </th>
6363
</tr>
6464
</thead>
6565
<tbody>
6666
<tr>
6767
<td style="text-align:left;width: 15em; "> guid </td>
6868
</tr>
6969
<tr>
70-
<td style="text-align:left;width: 15em; "> status </td>
71-
</tr>
72-
<tr>
73-
<td style="text-align:left;width: 15em; "> state </td>
70+
<td style="text-align:left;width: 15em; "> name </td>
7471
</tr>
7572
</tbody>
7673
</table>
@@ -92,6 +89,32 @@ model.
9289
<tr>
9390
<td style="text-align:left;width: 15em; "> name </td>
9491
</tr>
92+
<tr>
93+
<td style="text-align:left;width: 15em; "> status </td>
94+
</tr>
95+
</tbody>
96+
</table>
97+
98+
</div>
99+
100+
<div style='float: left; margin-right: 1em;'>
101+
102+
<table class="table table-bordered table-striped table-hover table-condensed table-responsive" style="width: auto !important; margin-left: auto; margin-right: auto;">
103+
<thead>
104+
<tr>
105+
<th style="text-align:left;color: white !important;background-color: gray !important;font-size: 20px;"> Employee </th>
106+
</tr>
107+
</thead>
108+
<tbody>
109+
<tr>
110+
<td style="text-align:left;width: 15em; "> guid </td>
111+
</tr>
112+
<tr>
113+
<td style="text-align:left;width: 15em; "> state </td>
114+
</tr>
115+
<tr>
116+
<td style="text-align:left;width: 15em; "> status </td>
117+
</tr>
95118
</tbody>
96119
</table>
97120

@@ -185,6 +208,13 @@ file, your code should print an output similar to what is shown here.
185208
{'guid': '1c898066-858e-406c-a15d-36146c9642de', 'name': 'Paylocity', 'status': '2'}
186209
{'guid': '0090d7b0-b07a-47cd-b295-ff798a6c0613', 'name': 'Burrito Shack', 'status': '2'}
187210

211+
------------------------------------------------------------------------
212+
213+
Position
214+
==========
215+
{'guid': '40a36493-f450-4331-874c-5ef01aabe1d5', 'name': 'Software Engineer', 'status': '1'}
216+
{'guid': 'f9b3ee71-7fb2-4dd5-9c13-b4c10d11fde7', 'name': 'Data Engineer', 'status': '1'}
217+
188218
------------------------------------------------------------------------
189219

190220
Employee
@@ -202,13 +232,6 @@ file, your code should print an output similar to what is shown here.
202232
{'guid': 'f73a2796-4579-4779-8345-f0dfcf7dd533', 'company_guid': '0090d7b0-b07a-47cd-b295-ff798a6c0613', 'employee_guid': '4e0c8c17-b031-4a72-b73d-f0a85570826d'}
203233
{'guid': '5ab54bb5-b72d-40f8-9a49-e0d2d004d7a9', 'company_guid': '0090d7b0-b07a-47cd-b295-ff798a6c0613', 'employee_guid': '259d5154-5f76-481b-b0f9-53e24c3b570e'}
204234

205-
------------------------------------------------------------------------
206-
207-
Position
208-
==========
209-
{'guid': '40a36493-f450-4331-874c-5ef01aabe1d5', 'name': 'Software Engineer', 'status': '1'}
210-
{'guid': 'f9b3ee71-7fb2-4dd5-9c13-b4c10d11fde7', 'name': 'Data Engineer', 'status': '1'}
211-
212235
------------------------------------------------------------------------
213236

214237
Your code will be evaluated on the following elements, which will also

code/RMarkdown/README.Rmd

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,16 @@ Shown below are three tables from a relational database conceptual data model.
6868
library(kableExtra)
6969
library(purrr)
7070
71-
dbTables <- vector("list", length = 3)
71+
dbTables <- vector("list", length = 4)
7272
73-
names(dbTables) <- c("Employee", "Company", "Job")
73+
names(dbTables) <- c("Company", "Position", "Employee", "Job")
7474
75-
dbTables[["Employee"]] <- data.frame(Employee = c("guid", "status", "state"))
76-
7775
dbTables[["Company"]] <- data.frame(Company = c("guid", "name"))
7876
77+
dbTables[["Position"]] <- data.frame(Company = c("guid", "name", "status"))
78+
79+
dbTables[["Employee"]] <- data.frame(Employee = c("guid", "state", "status"))
80+
7981
dbTables[["Job"]] <- data.frame(Job = c("guid", "company_guid", "position_guid", "employee_guid"))
8082
8183
htmlTables <- dbTables %>%
@@ -89,12 +91,16 @@ htmlTables <- dbTables %>%
8991
)
9092
})
9193
92-
knitr::raw_html("<div style='float: left; margin-right: 1em;'>\n")
93-
knitr::raw_html(htmlTables[["Employee"]])
94+
knitr::raw_html("<div style='float: left; margin: 0 1em 0 1em;'>\n")
95+
knitr::raw_html(htmlTables[["Company"]])
9496
knitr::raw_html("\n</div>\n")
9597
9698
knitr::raw_html("<div style='float: left; margin: 0 1em 0 1em;'>\n")
97-
knitr::raw_html(htmlTables[["Company"]])
99+
knitr::raw_html(htmlTables[["Position"]])
100+
knitr::raw_html("\n</div>\n")
101+
102+
knitr::raw_html("<div style='float: left; margin-right: 1em;'>\n")
103+
knitr::raw_html(htmlTables[["Employee"]])
98104
knitr::raw_html("\n</div>\n")
99105
100106
knitr::raw_html("<div style='float: left; margin: 0 1em 0 1em;'>\n")
@@ -145,6 +151,13 @@ A sample input file is provided for you. It can be downloaded directly from the
145151
==========
146152
{'guid': '1c898066-858e-406c-a15d-36146c9642de', 'name': 'Paylocity', 'status': '2'}
147153
{'guid': '0090d7b0-b07a-47cd-b295-ff798a6c0613', 'name': 'Burrito Shack', 'status': '2'}
154+
155+
------------------------------------------------------------------------
156+
157+
Position
158+
==========
159+
{'guid': '40a36493-f450-4331-874c-5ef01aabe1d5', 'name': 'Software Engineer', 'status': '1'}
160+
{'guid': 'f9b3ee71-7fb2-4dd5-9c13-b4c10d11fde7', 'name': 'Data Engineer', 'status': '1'}
148161

149162
------------------------------------------------------------------------
150163

@@ -163,13 +176,6 @@ A sample input file is provided for you. It can be downloaded directly from the
163176
{'guid': 'f73a2796-4579-4779-8345-f0dfcf7dd533', 'company_guid': '0090d7b0-b07a-47cd-b295-ff798a6c0613', 'employee_guid': '4e0c8c17-b031-4a72-b73d-f0a85570826d'}
164177
{'guid': '5ab54bb5-b72d-40f8-9a49-e0d2d004d7a9', 'company_guid': '0090d7b0-b07a-47cd-b295-ff798a6c0613', 'employee_guid': '259d5154-5f76-481b-b0f9-53e24c3b570e'}
165178

166-
------------------------------------------------------------------------
167-
168-
Position
169-
==========
170-
{'guid': '40a36493-f450-4331-874c-5ef01aabe1d5', 'name': 'Software Engineer', 'status': '1'}
171-
{'guid': 'f9b3ee71-7fb2-4dd5-9c13-b4c10d11fde7', 'name': 'Data Engineer', 'status': '1'}
172-
173179
------------------------------------------------------------------------
174180

175181
Your code will be evaluated on the following elements, which will also form the basis for our questions.

0 commit comments

Comments
 (0)