Using the below relational schema, determine whether the following query is both type and semantically correct:


SELECT P.petNo, petName, oName, O.TelNo
FROM Pet P, Owner O, Prescription Pr, Medication M, Surgery S
WHERE Pr.medNo = M.medNo AND
S.surgeryNo = O.surgeryNo AND
PR.petNo = P.petNo AND
P.ownerNo = O.ownerNo AND
M.medNo = ‘J. Smith’ AND adminMethod = ‘Oral’ AND
S.surgeryNo = 100;


Various problems with query:


surgeryNo is not part of Owner table;
medNo is not a textual attribute but an integer;
TelNo is not part of Owner (its oTelNo)

Computer Science & Information Technology

You might also like to view...

The ____ is located at the bottom of the Windows desktop and holds a variety of useful controls, including application buttons and a notification area.

A. PC Settings panel B. taskbar C. Charms menu D. Help and Support Center

Computer Science & Information Technology

Which logical unit of the computer sends information that has already been processed by the computer to various devices so that the information may be used outside the computer? _______ .

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

How do you set document defaults?

What will be an ideal response?

Computer Science & Information Technology

The relative humidity range in the server room should be 40 percent to 60 percent

Indicate whether the statement is true or false.

Computer Science & Information Technology