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
Explain the EXEC statement in SQL  Ans: All statements which start with EXEC SQL are embedded SQL database statements. High level languages such as C can be employed to write a

Benefits and Limitations od Data Models?

Explain the use of constraints in functional model with suitable example. A constraint shows relationship between two objects at same time, or   among various values of the sam

Explain the Concept of Two-phase Locking It concerns the positions of locking and unlocking operations in each transaction.  In this protocol every transaction issue lock and u

What are the reasons for having variable length records? What are the various ways to store variable length records? Variable-length records arise in a database in various wa

Problem: A DBMS built for Online Transaction Processing (OLTP) is usually regarded as unsuitable for data warehousing. Each system is designed with a different set of requireme

The database depicted in the Visio diagram describes Proceeding , Article , Researcher , article PublishedIn a proceeding, article WrittenBy researchers and proceedings Edi

using the invoice table shown below,write the relational schema,draw a dependencies,inclunding all partial and transitive dependencies.assume that the table does not contain repeat

An example of a weak entity is Staff because the availabilityID cannot be uniquely identified unless it is used in conjunction with the foreign key known as availabilityID in the A

Describe the Composite Key Composite Key: Sometimes one key is not enough to uniquely recognize a row. E.g. in a single class Roll is enough to search a student, but in the w