Consider the relation schema corresponding to the IsA hierarchy in Figure 4.6. Assume that this schema has one relation per entity. (Consult Section 4.4 to refresh your memory about translation of IsA hierarchies into the relational model.) Write the following queries both in tuple and domain relational calculus:

a. Find the names of all sophomores in the computer science major.
b. Find the names of all students in the computer science major.
c. Find all departments where some technician has every specialization that any other technician (in the same or another department) has.


a.


{Name | ?DOB?SSN?Major
(Person(SSN,Name,DOB) AND Sophomore(SSN,Major)) }


b.

{Name | ?DOB?SSN?Major?Advisor (Person(SSN,Name,DOB) AND
(Sophomore(SSN,Major) OR
Junior(SSN,Major) OR
Senior(SSN,Major,Advisor) ) ) }


c. One way to answer this query is to de?ne a view with one attribute, Name:

Specialization = {Spec |?SSN(Technician(SSN, Spec))}


Then we can write the query as

{Department | ?SSN?Salary (Employee(SSN,Department,Salary)
AND ?Spec ? Specialization.Name (Technician(SSN,Spec)) )


Without the use of views, the query would require the implication connective ?:

{Department | ?SSN?Salary (Employee(SSN,Department,Salary)
AND ?Specialization?SSN2 (Technician(SSN2,Specialization)
? Technician(SSN,Specialization)) )

Computer Science & Information Technology

You might also like to view...

A(n) ____________________ is a datasheet nested in another datasheet that displays records from a related table.

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

Computer Science & Information Technology

Case-Based Critical Thinking QuestionsCase 12-1Ethan is teaching his younger brother James the basics of Microsoft Excel. Please answer the following questions. Ethan then shows James how to select a(n) _____, which is a series of cells.

A. order B. range C. sequence D. group

Computer Science & Information Technology

Rounded corners increase the amount of space available for content in an element.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

When monitoring and managing DNS and DHCP servers using IPAM, what category lists managed servers by service type along with their current status?

A. IP Address Inventory B. DNS Zones C. DHCP Scopes D. DNS and DHCP Servers

Computer Science & Information Technology