Risk of COVID-19 ER Diagram
Published: 2020-09-07 03:19:10

At this point during the pandemic, a lot of people are wondering how at risk they are for COVID-19. COVID has been known to make people very ill and even bring some to their deathbed. So how at risk am I? This is a question that many people ask themselves when they think of catching the virus. The level of risk you are at when catching the virus can depend on many factors. These factors can vary depending on your lifestyle, age, and many others. This ER diagram that I have created is a data model that can show how the different levels of risk you are based on a few entities. 
In this ER diagram that I have created, I used six different entities. They are Patient, Hospitals, Risk, Occupation, Geographic Location, and Behavior. All of these factors are very important when deciding how at risk you are for having severe symptoms of the virus.
 ![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/4nmkx19kj8j68rjqjsxz.JPG)
For example, with the patient entity, it has five attributes and several relationships connecting it to other entities. These attributes within the patient entity are gender, age, weight, height, and forehead temperature. These factors are very important to outline because they can help determine whether or not you should go to the hospital when you are feeling sick. This entity connects to several other entities through the relations “where patient is living” and “Is participating in”. The where patient is living entity is an important connection the hospitals entity because it determines which hospital you need to go to based on your location. The “is participating in” relation connects to behavior because what they are participating in can increase their risk.
The next entity I chose to use is the hospitals entity, which has the attributes doctors, nurses, attitude of staff, ICU capacity, and skills. It is also connected to the “where patient is living attribute” which was explained in the paragraph above. These attributes are important because they outline the skills of the doctors and staff as well as the strength of the hospital
The entity geographic location was included in the diagram along with the attributes country, state, county, street, and house number/apartment. It is also connected to the “is living in high risk area” relation that connects to the risk entity. These attributes outline where the patient lives. The relation is connected to the risk entity because certain locations are more susceptible to contracting the virus
The fourth entity that I decided to use in the diagram was the behavior entity which has the attributes partying, quarantining, going to class, going into the office, and only hanging out with a small group of friends. It also is connected using the relation “is participating in” which is connected to the patient entity. These attributes are important because based on your behavior, you can be more likely to catch the virus. 
The fifth entity that I decided to use is the occupation entity that has the attributes essential worker, solo truck driver, class at home, works from home, and works in close contact. It is connected by the “is employed” in relation to describe where the patient works. These attributes show the risk of the patient based on their job.
The final entity that I used was the risk entity, which attributes malnourished, medical condition, smoker, compromised immune system, and older adults show the major risks of the virus. It is also connected by the “is living in high risk area” relation since if you live in a high risk area you are more at risk. 
When creating the tuples, I made sure to lay them out in a way that was easy to read, almost like filling out a paper you get when arriving at the doctor’s office. It also directly corresponds with the diagram in a way that is easy to follow. 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/1w9uz5jlrnzdos2e03ia.JPG)
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/zfpmztho2jq5fah3d9ho.JPG)
Here is the link to my video describing the diagram:
https://www.youtube.com/watch?v=HXcoBoUCqQw