deletequestion.php

The Eduladder is a community of students, teachers, and programmers just interested to make you pass any exams. So we solve previous year question papers for you.
See Our team
Wondering how we keep quality?
Got unsolved questions?

Ask Questions
ADVANCED-DBMS-10CS751-->View question


Discuss Various types of Inner Join Operations? : Database Management Systems - 10CS54 VTU notes 8 Marks (Jun / July2014) (5 marks Dec 14/Jan 15)(10 Marks Jan 2016)

Types of joins

By:anonymousguy7799

Taged users:


Likes:
Be first to like this question

Dislikes:
Be first to dislike this question

Talk about thisDelete|Like|Dislike|


Answers

inner join The cartesian product example above combined each employee with each department. If we only keep those lines where the dept attribute for the employee is equal to the dnr (the department number) of the department, we get a nice list of the employees, and the department.
 • A very common and useful operation.
 • Equivalent to a cartesian product followed by a select. 
• Inside a relational DBMS, it is usually much more efficient to calculate a join directly, instead of calculating a cartesian product and then throwing away most of the lines. 
• Note that the same SQL query can be translated to several different relational algebra expressions, which all give the same result. VTUlive.com 25
 • If we assume that these relational algebra expressions are executed, inside a relational DBMS which uses relational algebra operations as its lower-level internal operations, different relational algebra expressions can take very different time (and memory) to execute
. Consider the following schema Sailor(Sal-id,Sal-name,rating,age) Reserves(Sal-id,Boat-id,day) Boats(Boat_id,boatname,color) I. Find the names of sailors ,who have reserved all boats,called Interlake? Select Sal-name from Sailor s, Reserves r,Boats b where r.sal-id==s.sal-id and r.boat-id==b.boat-id and boat-name=”Interlake”; II. Find the Sid of the sailor with age over 20 who haven’t reserved the boat. 
 Select sid from sailor s where NOT EXISTS(select S.Sal-id FROM Sailor S ,Reserves r ,Boats b where r.bid=b.boat-id) and age>20; III Find the names of sailors,who have reserved atleast Two Boats Select S.sal-name from sailors S,Reserves r,boats b where r.salid=s.sal-id and b.boat-id=r.boat-id having count(*)>=2 

Nikhil-bharadwaj

Likes:
Be first to like this answer

Dislikes:
Be first to dislike this answer
Talk about this|Once you have earned teacher badge you can edit this questionDelete|Like|Dislike|
------------------------------------
inner join The cartesian product example above combined each employee with each department. If we only keep those lines where the dept attribute for the employee is equal to the dnr (the department number) of the department, we get a nice list of the employees, and the department.
 • A very common and useful operation.
 • Equivalent to a cartesian product followed by a select. 
• Inside a relational DBMS, it is usually much more efficient to calculate a join directly, instead of calculating a cartesian product and then throwing away most of the lines. 
• Note that the same SQL query can be translated to several different relational algebra expressions, which all give the same result. VTUlive.com 25
 • If we assume that these relational algebra expressions are executed, inside a relational DBMS which uses relational algebra operations as its lower-level internal operations, different relational algebra expressions can take very different time (and memory) to execute
. Consider the following schema Sailor(Sal-id,Sal-name,rating,age) Reserves(Sal-id,Boat-id,day) Boats(Boat_id,boatname,color) I. Find the names of sailors ,who have reserved all boats,called Interlake? Select Sal-name from Sailor s, Reserves r,Boats b where r.sal-id==s.sal-id and r.boat-id==b.boat-id and boat-name=”Interlake”; II. Find the Sid of the sailor with age over 20 who haven’t reserved the boat. 
 Select sid from sailor s where NOT EXISTS(select S.Sal-id FROM Sailor S ,Reserves r ,Boats b where r.bid=b.boat-id) and age>20; III Find the names of sailors,who have reserved atleast Two Boats Select S.sal-name from sailors S,Reserves r,boats b where r.salid=s.sal-id and b.boat-id=r.boat-id having count(*)>=2 

Nikhil-bharadwaj

Likes:
Be first to like this answer

Dislikes:
Be first to dislike this answer
Talk about this|Once you have earned teacher badge you can edit this questionDelete|Like|Dislike|
------------------------------------

Can you help us to add better answer here? Please see this



Not the answer you're looking for? Browse other questions from this Question paper or ask your own question.

Join eduladder!