Give expression in both tuple calculus and domain calculus, Database Management System

Assignment Help:

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')}


Related Discussions:- Give expression in both tuple calculus and domain calculus

What is indexed sequential file organization, What is indexed sequential fi...

What is indexed sequential file organization? What are the applications of this organization?  Ans: An index file can be employed to effectively overcome the problem of storing

Heuristics, Benefits of using heuristics

Benefits of using heuristics

Thid, describe objectivde of file organisation

describe objectivde of file organisation

What is outer join, What is Outer join?  They can be employed while we ...

What is Outer join?  They can be employed while we want to keep all the tuples in R, or all those in S or all those in both relations in the result of the JOIN in spite of of w

What are referential integrity constraints, What are referential integrity ...

What are referential integrity constraints? A value that appears in single relation for a given set of attributes also appears for a particular set of attributes in another rel

What is repository?, Problem 1 Why are the operational system keys not ...

Problem 1 Why are the operational system keys not recommended for forming data warehouse primary keys? Give any two examples 2 Explain the following performance tuning techn

Database, why are older data models are being replaced by new data models

why are older data models are being replaced by new data models

Insert statement reverses storage space and transfers value, A field-groups...

A field-groups statement or an insert statement reverses storage space and transfers values. False.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd