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 banker's algorithm?  Banker's algorithm is a deadlock avoidance algorithm that is applicable to a resource-allocation system with multiple instances of each resource ty

Relations create the database. They must satisfy various properties, like no duplicate tuples, no ordering of tuples, and atomic attributes, etc. Relations that satisfy these basic

Explain Derived and Non-Derived Attribute? In few cases, two or more attribute values are related, for instance, Age and BirthDate attributes of a person. For specific person e

Describe the term- State Diagram State Diagram: An object could receive a sequence of the input instructions. The state of the object can differ depending upon sequence of in

Compare the Nested-loop join and block-nested loop join Ans: Nested  loop join - It is costly as worst case cost, no. of block accesses needed is n r * b s + b r   where b

Northwind Pty Ltd sells a variety of food products throughout the world. They want to use the reporting features of SAP''s Business Information Warehouse to better understand thei

Suppose that in an organisation, an employee may do different roles in dissimilar projects. Say, RAM is doing coding in one project and doing designing in another. Suppose that the

While sorting, if the main storage available is not enough, the system writes data to an external help file.  The SAP profile parameter, which determines DIR_SORTTMP


List the string operations supported by SQL? 1) Pattern matching Operation 2) Concatenation 3) Extracting character strings 4) Converting among uppercase and lower cas