search
Log In

Recent questions tagged natural-join

3 votes
2 answers
1
Given two tables $\mathrm{R_1(x,y)}$ and $\mathrm{R_2(y,z)}$ with $50$ and $30$ number of tuples respectively . Find maximum number of tuples in the output of natural join between tables $\mathrm {R_1}$ and $\mathrm{R_2}$ $1)\;30 $ $ 2)\; 20 $ $ 3) \;50 $ $ 4)\; 1500$
asked Dec 20, 2019 in Databases Sanjay Sharma 494 views
0 votes
0 answers
2
how to write the query for natural join on three relations in SQL using the NATURAL JOIN clause?
asked May 8, 2019 in Databases aditi19 113 views
0 votes
1 answer
3
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's or laptops) with speeds of at least 3.0 is my query correct? select maker from ... where speed>=3 AND count(distinct model)>=2 UNION select maker from Product NATURAL JOIN Laptop where speed>=3 AND count(distinct model)>=2
asked May 7, 2019 in Databases aditi19 193 views
0 votes
0 answers
5
Suppose we have 2 tables R1(ABCD), R2(DE) . R1 has 500 entries whereas R2 has 1500 entries. Here D is a candidate key. If we join them using natural join. How many entires would be there in the resultant table and why ? Examples would be appreciated..
asked Jan 8, 2019 in Databases Shamim Ahmed 126 views
0 votes
0 answers
6
In a natural join, the common attribute occur only once, but in join https://gateoverflow.in/3718/gate2004-it-74 Select * from Student, Department in this common, attribute we have given m+n I tried in w3 schools https://www.w3schools.com/sql/sql_join.asp SELECT * FROM Orders, Customers WHERE City='Berlin' AND OrderID = '10248' here common attribute is occuring only once, PLease guide .
asked Dec 14, 2018 in Databases Learner_jai 86 views
0 votes
0 answers
7
If NO ATTRIBUTES are common in both relations (R and S) then the result of natural join is ?? a. Empty relation. b. Cartesian Product of the relations.
asked Dec 8, 2018 in Databases cidacoder 50 views
1 vote
1 answer
8
consider $r1(A,B,C),r2(C,D,E)$ and $r3(F,G)$ with primary key $A,C,F, r1$ has $150 ,r2$ has $100$ and $r3$ has $75$ tuples the number of tuples in $r1$ natural join $r2$ natural join $r3?$
asked Nov 30, 2018 in Databases Abhisek Tiwari 4 122 views
0 votes
0 answers
9
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?
asked Nov 2, 2018 in Databases aditi19 61 views
0 votes
1 answer
10
A B C 1 a c 2 b b 3 c a 4 c c A B D 1 a a 1 b b 3 c c 4 c d these are two table R AND S FIND NATURAL JOIN(*)
asked Nov 1, 2018 in Databases amit166 29 views
0 votes
1 answer
11
Let $R(A,B,C)$ be a relation with primary key $(A)$ and $S(A, D, E)$ a relation with primary key $(A, D)$. Each of the relations has $n$ tuples. If the number of tuples in $R \: \text{ natural join } S$ is $m$, then determine the number of tuples in $R$ $\text{ natural left outer join } S$.
asked Sep 20, 2018 in Databases jothee 94 views
1 vote
0 answers
12
Consider two relations R(A, B, C) and S(B, D) with R contains 5000 tupples stored in a sequential file sorted on attribute A and S contain 100000 tupples stored in a sequential file sorted on attribute B. Each block can hold 10 R tupples or 10 S tupples. Which one of the following index is most appropriate for answering query (Assume index always stored in memory)
asked Aug 19, 2018 in Databases syncronizing 72 views
0 votes
0 answers
13
Consider two relations R(A, B, C) and S(B, D) with R contains 5000 tuples stored in a sequential file sorted on attribute A and S contain 100000 tuples stored in a sequential file sorted on attribute B. Each block can hold 10 R tuples or 10 S tuples. Which one of the following index is most appropriate for answering query R (natural Join) S (Assume index always stored in memory)
asked Jul 14, 2018 in Databases Na462 252 views
2 votes
1 answer
14
Consider a relation r1(A, B, C), r2(C, D, E) and r3(F, G) with primary keys A, C and F respectively. Assume that r1 has 150 tupples, r2 has 100 tupples and r3 has 75 tupples. The number of resultant tuple in are ________.
asked Jun 14, 2018 in Databases Na462 1k views
0 votes
0 answers
15
Consider relation R' and S' have n' and m' tuples, respectively. Choose the best matching between List-I (Expression) and List-II (Maximum number of tuple): Soln. According to me Answer should be Option C. 1.R union S = m+n (easy nothing to say) 2. Say Relations are like:- R(A,B,C) s(C,D) ... D 1 2 3 3 4 2 3 3 3 5 4 3 3 3 6 Now in R natual join S = m * n So option C should suffice isn't it ?
asked Jun 14, 2018 in Databases Na462 329 views
0 votes
2 answers
16
When we do natural join say between R1(A,B,C) and R2(A,B,D) we get new Relation as ---> R(A,B,C,D) Say if we do Theta join using a Predicate P then the result will be ----> R(A,B,C,A,B,D) Am i right?
asked May 17, 2018 in Databases Na462 117 views
0 votes
0 answers
17
Q.1. Does theta join operator requires following union compatibility requirements?: Same number of columns Domain of corresponding columns should be same I feel no, since I came across following fact: $\sigma_\theta( R_1\times R_2)=R_1⋈_\theta R_2$ But I need ... and selection as shown above, does it mean columns of resultant relation will contain ALL columns from both $R_1$ and $R_2$?
asked May 12, 2018 in Databases GateAspirant999 234 views
2 votes
0 answers
18
Consider two relations R(A, B, C) and S(B, D) with R contains 5000 tupples stored in a sequential file sorted on attribute A and S contain 100000 tupples stored in a sequential file sorted on attribute B. Each block can hold 10 R tupples or 10 S tupples. Which one of the following index is ... in memory) A A dense index on R.B B A sparse index on R.B C A dense index on S.B D A sparse index on S.B
asked May 4, 2018 in Databases visakh v 143 views
1 vote
1 answer
19
My answer is not matching with any of the option.so what is the correct answer
asked Jan 24, 2018 in Databases learner_geek 445 views
1 vote
1 answer
20
If a question asks anything about 'Join' without describing what sort of join it is, should I consider that as a cross product join or Natural Join? (PS: As far as my knowledge goes, Natural join is almost equivalent to Inner Join and not Cross product.) Refer this question : https://gateoverflow.in/1471/gate1999-1-18-isro2016-53
asked Jan 9, 2018 in Databases Warlock lord 79 views
0 votes
0 answers
22
Consider the relation schema: Student(roll no, name course no) Enroll(roll no, course no,course name) The number of tuples in the student and enroll table is 30 and 40 respectively The natural join is performed on roll no., what is max. and min. no. of tuples that are possible?
asked Dec 16, 2017 in Databases srestha 376 views
0 votes
0 answers
23
R is divided into R1 and R2 ,but since there is no common attribute in R1 and R2, so it should form lossy join,as for loseless join the common attribute has to be key in one of the table.But here the image above,it is comming as loseless join.Can someone please check?
asked Dec 12, 2017 in Databases rahul sharma 5 103 views
2 votes
2 answers
24
Say we have two relations R (a,b,c) and S (b,d,e). Now, R has 200 tuples and S has 300 tuples. What will be Minimum number of tuples when we do R ⋈ S ( ⋈ = Natural Join)?
asked Dec 6, 2017 in Databases iarnav 388 views
2 votes
1 answer
25
Please kindly explain Natural Join by taking your own handmade example in layman terms. Thank you!
asked Nov 27, 2017 in Databases iarnav 447 views
1 vote
0 answers
26
Let R and S be two relations with the following schema R(P−−,Q−−,R1,R2,R3) S(P−−,Q−−,S1,S2) where {P,Q} is the key for both schemas? R:{⟨"1","abc","p1","p2","p3"⟩, ⟨"2","xyz","p1","p2","p3"⟩} S:{⟨"1","abc","q1","q2","q3"⟩ ⟨"2","def","q1","q2","q3"⟩ WHat is R *S? WHERE * IS NATURAL JOIN.
asked Nov 27, 2017 in Databases iarnav 150 views
3 votes
1 answer
27
Which one is the more suitable answer for the following question, equijoin or natural join?
asked Oct 25, 2017 in Databases Manu Thakur 376 views
0 votes
0 answers
28
Can we say inner and self join are same ?
asked Sep 29, 2017 in Databases set2018 72 views
2 votes
2 answers
29
Consider a relation R with 2000 records and relation S with 500 records. Size of each record is 5 Byte and block size is 100 Byte, then minimum number of block access that are needed block nested loop join. I think its answer should be 2525.
asked Aug 18, 2017 in Databases Shubhanshu 511 views
1 vote
1 answer
30
What will be the output of Natural Join if there is(are) common attribute(s) in two relations but no common value in these common attribute(s) ? for example Table R A B 6 9 7 1 Table S B C 7 3 5 8 R Natural Join s will be ?
asked Aug 4, 2017 in Databases rdfan19 175 views
...