Worksheet 1 - DB, R, SQL, Oh My!

Author

Jo Hardin

Published

January 8, 2023

Your Name: __________________________________

Names of people you worked with: __________________________________

Task: Consider a large hospital system that coordinates all aspects of health care: doctors, visits, prescriptions, surgeries, billing, etc. Let’s say that the hospital has a database which includes a series of tables linking all the needed information that they routinely collect.

  1. Come up with at least five tables which might exist in the hospital database. For each table indicate a few columns / variables.

  2. Draw arrows between the tables and indicate the variable(s) that link the tables. No table should be completely isolated.

Solution:

The solution is taken directly from w3resource. Consider the hypothetical SQL schema diagram in . Some of the tables and respective variables are described below.

Fifteen different hypothetical tables with relevant variables which connect the tables.
Figure 1: SQL schema describing links of tables from a hypothetical hospital database, image credit: https://www.w3resource.com/sql-exercises/hospital-database-exercise/index.php

:::