consider the following relational schema


Consider the following relational schema:
Doctor(DName,Reg_no)
Patient(Pname, Disease)
Assigned_To (Pname,Dname)
Give expression in both Tuple calculus and Domain calculus for every of the queries:
(i) Get the names of patients who are assigned to more than one doctor.
(ii) Get the names of doctors who are treating patients with ‘Polio'.

Ans:
(i)Tuple Calculus:
{p[PName] | p ∈ PATIENT ∧ ∃a1, a2 (a1 ∈ ASSIGNED_TO ∧ a2 ∈ ASSIGNED_TO ∧
p[PName] = a1[PName] ∧ a1[PName] = a2[PName] ∧ a1[DName] ≠ a2[DName])}
Domain Calculus:
{p | ∃p1, d1, p2, d2 ( ∈ PATIENT ∧ ∈ ASSIGNED_TO ∧
ASSIGNED_TO ∧ p1 = p2 ∧ d1 ≠ d2)}
(ii)Tuple Calculus:
{u[Dname] | u ∈ ASSIGNED_TO ∧ ∃t (t ∈ PATIENT ∧ t[Disease] = ‘Polio' ∧
t[PName] = u[PName])}
Domain Calculus:
{d | ∃p1, p2, s2 ( ∈ ASSIGNED_TO ∧ ∈ PATIENT
∧ p1 = p2 ∧ s2 = ‘Polio')}

Request for Solution File

Ask an Expert for Answer!!
Database Management System: consider the following relational schema
Reference No:- TGS0282445

Expected delivery within 24 Hours