# Recent questions tagged joins

Is the JOIN operations(natural , left , right) in relational algebra and SQL same or is there any difference based on the condition? Please provide reference.
No. of tuples obtained as the output of an outer join (left, right or full outer join) is a superset of the no. of tuples obtained in Natural join. Is the abv. statement TRUE or FALSE? State with Reason.
Can someone please clarify why we keep the smaller loop outer and the bigger loop inner? (i.e. why do we select the relation with smaller number of tuples as the outer relation)
1 vote
Consider the following relations $A, B$ and $C:$ ... of $A\cup B$ is the same as that of $A$. $(A\cup B)\bowtie _{A.Id > 40 \vee C.Id < 15} C$ $7$ $4$ $5$ $9$
Consider the following relation schema pertaining to a students database: Students (rollno, name, address) Enroll (rollno, courseno, coursename) where the primary keys are shown underlined. The number of tuples in the student and Enroll tables are $120$ and $8$ respectively. What are the maximum and ... in (Student * Enroll), where *' denotes natural join? $8, 8$ $120, 8$ $960, 8$ $960, 120$
Consider a join (relation algebra) between relations $r(R)$ and $s(S)$ using the nested loop method. There are 3 buffers each of size equal to disk block size, out of which one buffer is reserved for intermediate results. Assuming size(r(R))<size(s(S)) , the join will have fewer number of ... $r(R)$ and $s(S)$ is more than 0.5. join selection factor between $r(R)$ and $s(S)$ is less than 0.5.
1 vote
A database table $T_1$ has $2000$ records and occupies $80$ disk blocks. Another table $T_2$ has $400$ records and occupies $20$ disk blocks. These two tables have to be joined as per a specified join condition that needs to be evaluated for every pair of records ... in the outer loop, the reduction in number of block accesses required for reading the data will be $0$ $30400$ $38400$ $798400$
Consider the following relation schemas : b-Schema = (b-name, b-city, assets) a-Schema = (a-num, b-name, bal) d-Schema = (c-name, a-number) Let branch, account and depositor be respectively instances of the above schemas. Assume that account and depositor relations are much bigger ... < 0 account) ⋈ depositor) Пc-name (σb-city = "Agra" branch ⋈ (σb-city = "Agra" ⋀ bal < 0 account ⋈ depositor))
A database table $T_1$ has $2000$ records and occupies $80$ disk blocks. Another table $T_2$ has $400$ records and occupies $20$ disk blocks. These two tables have to be joined as per a specified join condition that needs to be evaluated for every pair of records from ... table to be used in outer loop, the number of block accesses required for reading the data are $800000$ $40080$ $32020$ $100$
What is the number of block access in Indexed Nested Loop join & Sort-merge Join??? given, No. of blocks in relation R = $B_{r}$ No. of blocks in relation S = $B_{s}$ No. of records in relation i = $r_{i}$ Join is like R x S & size of R is less than size of S