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

What is an entity relationship model? The entity relationship model is a set of basic objects known as entities and relationship between those objects. An entity is a thing or

What are the disadvantages of relational approach? Disadvantages of relational approach: • Substantial hardware and system software overhead • May not fit all business models •

The following relational database schema represents part of a simplified database used by a library: tblBook (BookID, Title, PublisherID, Category,Price) tblPublisher (Publishe

OPENCART - Want Massive amount of products Imported through CSV We have a massive list of products that would take completely too long to do data entry. We require a slick progr

Explain Alternate key? Alternate Key - All the candidate keys except primary key are known as alternate keys.

Explain the disadvantages of using DBMS There could be a few disadvantages of using DBMS. As DBMS requires computers, we have to invest a good amount in acquiring the hardwa

Explain the Difference between DROP and DELETE DELETE deletes one or more than one tuples of a particular relation from the database. DROP is employed to remove a table from th


Explain cursors in SQL? Cursors in SQL - An object used to store the output of a query for row-through-row processing through the application programs. Cursors are constructs