Example of equijoin, Database Management System

Example:

Consider the following relations:

ROLLNO

NAME

ADDRESS

COURSE_ID

100

Kanupriya

234, Saraswati Vihar.

CS1

101

Rajni Bala

120, Vasant Kunj

CS2

102

Arpita Gupta

75, SRM Apartments.

CS4

STUDENT

Course

COURSE ID

COURSE_NAME

DURATION

CS1

CS1

BCA

3yrs

CS2

MCA

3yrs

CS3

M.Sc.

2yrs

CS4

B.Sc.

3yrs

CS5

MBA

2yrs

 

 

 

If we want to show name of all the students with their course details then natural join is used in the following method:

STUDENT     COURSE

Resultant relation will be as follows:

If R2                    R3= R1 ÷ R2                      If R2                       R3= R1 ÷ R2

Student

ROLLNO

NAME

ADDRESS

COURSE_ID

COURSE_NAME

DURATION

100

Kanupriya

234, Saraswati

Vihar.

CS1

BCA

3yrs

101

Rajni Bala

120, Vasant Kunj

CS2

MCA

3yrs

102

Arpita

Gupta

75, SRM

Apartments.

CS4

B.Sc.

3yrs

 

 

 

 

 

There are some other types of joins like outer joins.

Posted Date: 3/6/2013 5:55:34 AM | Location : United States







Related Discussions:- Example of equijoin, Assignment Help, Ask Question on Example of equijoin, Get Answer, Expert's Help, Example of equijoin Discussions

Write discussion on Example of equijoin
Your posts are moderated
Related Questions
Differentiate between join and outer join? Outer joins return all rows from at least one of the tables or views mentioned within the FROM clause, as long as those rows get toge

Provide Examples of different types of Time and Date formats.  It's most common store dates using a dash (-) as a colon (:)and the delimiter as the time delimiter. The given fo

Compute the closure (F+) for the following set of the functional dependencies defined on R(a,b,c,d), where F - {c→ a, ab → d, a → b, d → c}, i.e. what are all of the FDs implied b

client server architeutre

What is the use of Union and intersection operation? Union: The result of this operation contains all tuples that are either in r1 or in r2 or in both r1 and r2.Duplicate tuple

Explain the components of Database System in details.

.#question. Discuss the problem which may arise during concurrency control and recovery in distributed database which are not encountered in controlized database environment.

Define the phases of two phase locking protocol Growing phase: a transaction may get locks but not release any lock. Shrinking phase: a transaction might be release locks bu

a. Define the term "deadlock". There are four conditions that must hold before deadlock is possible. Name them. b. Outline an algorithm that detects whether there is a deadlock.

Construct a generalization-specialization hierarchy for a motor-vehicle sales company. The company sells motorcycles that comprise an engine number and cost; cars that have a chass