Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Code the following in relational calculus: 1) Find persons who go only to hospitals that offer some of the treatments they like 2) Find every

image text in transcribedimage text in transcribedCode the following in relational calculus:

1) Find persons who go only to hospitals that offer some of the treatments they like

2) Find every treatment offered by at least one hospital and effects the COVID-19 disease

Q1. Consider the following tables (relations) that contain information (all stored as names) about persons visiting hospitals, treatments offered by hospitals, treatments liked by persons, and treatments effective for diseases. A person can like several treatments; a treatment can be liked by many persons. A person can go to several hospitals, and a hospital may be visited by many persons. A hospital can offer many different treatments, and a treatment can be offered by several hospitals. A treatment may be effective for several diseases and a disease may be effected by many treatments. Please note that in all the queries at least one some means Visits(person, hospital) Offers(hospital, treatment) Likes(person, treatment) Effects(treatment, disease)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions

Question

1. Where do these biases come from?

Answered: 1 week ago