Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write each of the following queries in Relational Algebra (You are not allowed to use grouping function) Question 1. [50 marks] Consider the following relational

Write each of the following queries in Relational Algebra (You are not allowed to use grouping function)

image text in transcribed

Question 1. [50 marks] Consider the following relational database scheme TREATMENT (disease, medication) PERSON (SSN, firstName, lastName, phone, email, address, city, province) PATIENT (patient_id, SSN) DOCTOR (doctor_id, SSN, disease_of_specialization) TREATED (doctor_id, patient id, date, procedure, diagnostio) A patient may suffer from several diseases, and may take several medications for each disease. It is possible to a doctor to be a patient and vice-versa. The domains of the attributes "disease" and "disease-of-specialization" are the same, namely, the set of all diseases. In "treated" relation, the procedure could be consultation, or intervention (surgery etc.) and the diagnostic could be the name of a disease or the type of intervention. Write each of the following queries in Relational Algebra (You are not allowed to use grouping function) a. Give the detail (SSN, firstName, lastName, phone, email, address, city, province) of doctors who do not suffer from any disease b. List detail of patients (SSN, firstName, lastName, phone, email, address, city, province) who suffer from more than one disease Give the firstName, lastName and phone of doctors who are also patients suffering from a disease in their own specialization c. d. Find diseases for which there is only one medication. e. Give the detail (SSN, firstName, lastName, phone, email, address, city, province) of patients who are diagnosed with HIV, Heart Disease, Diabetic and Blood pressure as well

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

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2017 Skopje Macedonia September 18 22 2017 Proceedings Part 3 Lnai 10536

Authors: Yasemin Altun ,Kamalika Das ,Taneli Mielikainen ,Donato Malerba ,Jerzy Stefanowski ,Jesse Read ,Marinka Zitnik ,Michelangelo Ceci ,Saso Dzeroski

1st Edition

ISBN: 3319712721, 978-3319712727

More Books

Students also viewed these Databases questions

Question

How should a firm go about constructing a product attribute map?

Answered: 1 week ago