Deprecated: Implicit conversion from float-string "1582851088.723" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1582851088.723" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1582851088.723" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1582851088.723" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1582851088.723" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1611126450.681" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1611126450.681" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1611126450.681" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1611126450.681" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1611126450.681" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1607239409.228" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1607239409.228" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1607239409.228" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1607239409.228" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1607239409.228" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1663958994.469" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1663958994.469" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1663958994.469" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1663958994.469" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1663958994.469" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1703772147.500" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1703772147.500" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1703772147.500" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1703772147.500" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1703772147.500" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1607062681.845" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1607062681.845" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1607062681.845" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1607062681.845" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1607062681.845" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1677584467.610" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1677584467.610" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1677584467.610" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1677584467.610" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1677584467.610" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1605695772.172" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1605695772.172" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1605695772.172" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1605695772.172" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1605695772.172" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1630837505.037" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1630837505.037" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1630837505.037" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1630837505.037" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1630837505.037" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594

Deprecated: Implicit conversion from float-string "1605427575.364" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1605427575.364" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1605427575.364" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1605427575.364" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1605427575.364" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 594
GATE IT 2006 | Question: 14 / GATE Overflow for GATE CSE
edited by
17,260 views
42 votes
42 votes

Consider the relations $r_{1}\text{(P, Q, R)}$ and $r_{2}\text{(R, S, T)}$ with primary keys $\text{P}$ and $\text{R}$ respectively. The relation $r_{1}$ contains $2000$ tuples and $r_{2}$ contains $2500$ tuples. The maximum size of the join $r_1⋈ r_2$ is :

  1. $2000$
  2. $2500$
  3. $4500$
  4. $5000$
edited by

4 Answers

Best answer
45 votes
45 votes

The common attribute is $\text{R}$ and it is the primary key in the second relation. So $\text{R}$ value should be distinct (primary key implies unique) for $2500$ rows. Hence when we do join, maximum possible number of tuples is $2000.$

Correct option is A.

edited by
14 votes
14 votes

Let us see two scenarios with small number of tuples r1 having 5 tuples and r2 with 3 tuples.

Scenario 1: when all the attributes in R in r1 do not match value of R in r2.

r1
PQR
5m1
6n2
7o2
8p5
9q6
r2
RST
1am
2bn
3cu

natural join on r1 and r2 would give me

PQRST
5m1am
6n2bn
702bn

Scenario 2: 

There are no uncommon values for R between r1 and r2

PQR
5m1
6n2
7o2
8p2
9q1

Natural join would give

PQRST
5m1am
6n2bn
7o2bn
8p2bn
9q1am

So in this case we get the max number of tuples ,which is equal to the max number of tuples in relation r1.

Generalizing this inference we can derive that ans is a)2000 =max no of tuples in r1.

edited by
1 votes
1 votes

See the image below carefully in order to understand that the maximum cardinality of join operation is minimum tuples of R1,R2

Answer:

Related questions


Deprecated: Implicit conversion from float-string "1659880807.082" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1659880807.082" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1659880807.082" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1659880807.082" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1557220137.886" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1557220137.886" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1557220137.886" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1557220137.886" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803

Deprecated: Implicit conversion from float-string "1541183045.027" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 796

Deprecated: Implicit conversion from float-string "1541183045.027" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 801

Deprecated: Implicit conversion from float-string "1541183045.027" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 802

Deprecated: Implicit conversion from float-string "1541183045.027" to int loses precision in /var/www/html/qadb/qa-include/app/format.php on line 803
28.6k
views
7 answers
64 votes
Kathleen asked Sep 18, 2014
28,610 views
Consider the following relation schema pertaining to a students database:Students (rollno, name, address)Enroll (rollno, courseno, coursename)where the primary keys are s...
397
views
1 answers
0 votes
anupamsworld asked Aug 7, 2022
397 views
In relational databases, the natural join of two tables:Can be equivalent to cartesian product of these two tablesIs combination of union and filtered cartesian productIs...
1.7k
views
1 answers
0 votes
aditi19 asked May 7, 2019
1,674 views
Product(maker, model, type)PC(model, speed, ram, hd, price)Laptop(model, speed, ram, hd, screen, price)Find those manufacturers of at least two different computers (PC’...
306
views
0 answers
0 votes
aditi19 asked Nov 2, 2018
306 views
in case of outer join for combining two tables, if there is no common attribute does it returns cartesian product just like natural join does?
Total PHP MySQL Other RAM
Time (ms) % Time (ms) % File count Time (ms) % Query count Time (ms) % Amount %
Setup 4.4 3% 2.8 2% 72 1.6 1% 2 0.1 0% 569k 40%
Control 19.0 14% 2.8 2% 5 16.7 12% 12 0.0 0% 684k 48%
View 4.3 3% 4.3 3% 12 0.0 0% 0 0.0 0% 0k 0%
Theme 101.4 75% 5.5 4% 15 95.9 71% 3 0.0 0% 360k 25%
Stats 4.5 3% 0.1 0% 0 4.4 3% 1 0.0 0% 0k 0%
Total 133.6 100% 15.5 11% 104 118.6 88% 18 0.0 0% 1403k 100%