Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider ResearchBook, an online social network for researchers, which also helps one find possible collaborators. We are given a simple table with schema: ResInt (pid,

image text in transcribed

Consider ResearchBook, an online social network for researchers, which also helps one find possible collaborators. We are given a simple table with schema: ResInt (pid, topic) Person with pid has topic as a research interest Clearly a person can have multiple research interests (like 'Databases' and 'Artificial Intelligence'-so there may be multiple tuples for each pid in the relation. The goal of this question is to write a SQL query that gives us pairs of researchers with exactly the same research interests (as we can recommend them as collaborators). This query is trickyso let's try to solve it by the following steps. 4 Q4.1. (5 points) Write a SQL query to find all person-person-interest triplets (pidl, pid2, topic) such that person pidl has topic as a research interest, but person pid2 doesn't. Call this the PPT view Q4.2. (5 points) Given the earlier view PPT and the original table ResInt, write the full SQL query to find all pairs of people with the exact same set of research interests. Remove mirror pairs and self-pairs

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is electric dipole explain with example

Answered: 1 week ago

Question

What is polarization? Describe it with examples.

Answered: 1 week ago

Question

What were the reasons for your conversion or resistance?

Answered: 1 week ago