Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

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

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M9545043

Have any Question?


Related Questions in DBMS

Question talk about the importance of pulling data from

Question : Talk about the importance of pulling data from worksheets into a single sheet also the ways excel could be a solution to a complex challenge. The response must be typed, single spaced, must be in times new rom ...

Assignment task -write and run sql statements to complete

Assignment Task - Write and run SQL statements to complete the following tasks Part A - DML 1. Show the details of the products where the product code starts with '22'. 2. Display the vendor details from areacode 615. 3. ...

Sql assignmentin these exercises youll enter and run your

SQL Assignment In these exercises, you'll enter and run your own SELECT statements. You will use the MyGuitarShop database for these queries. If you do not already have the MyGuitarShop database, the SQL script and the i ...

A schools office of the registrar maintains data about the

A School's office of the registrar maintains data about the following entities: a) courses (including course number, title, credits, syllabus and prerequisites), b) course offerings (including course number, year, semest ...

Question create an erd for the following scenarioa small

Question: Create an ERD for the following scenario. A small company ABC wants a database to keep track of internal company information. Â Given the following information create an ERD. The ABC Company has several departm ...

Instructionsfor decades relational databases remained

Instructions For decades, relational databases remained essentially unchanged; data was segmented into specific chunks for columns, slots, and repositories, also called structured data. However, in this Internet of Thing ...

Question 1 what isdata-manipulation language dml there are

Question: 1. What isData-Manipulation Language (DML)? There are four types of access in DML, explain each one. 2. Assume we have a Library Database consists of the following relations: author(author_id, first_name, last_ ...

Sqlquery 1 how many products have standard price less than

SQL Query 1. How many products have standard price less than 1000? Query 2: Display all attributes for products made of "Cherry" from Product table w/o referring to column names. Query 3: Display all product names having ...

Question find at least two academic sources that describe

Question: Find at least two academic sources that describe the movement of Enterprise resource planning (ERP) activities to the cloud. Discuss the types of ERP activities that can be conducted in the cloud and the pros a ...

Question a suppose you are a marathon runner that can run a

Question : a) Suppose you are a marathon runner that can run a maximum of n miles on a single bottle of water. You are given a map of your marathon route with all the water stations marked. Design an efficient algorithm ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As