Example of equijoin, Database Management System

Assignment Help:

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.


Related Discussions:- Example of equijoin

Create records in a table - data structures, In this exercise you will crea...

In this exercise you will create ten records, each containing the following fields: student name, class:  Freshman, Sophomore, Junior or Senior, Major:  Liberal Arts or General Sci

Define integrity, (a) Explain briefly the three parts of a relational Model...

(a) Explain briefly the three parts of a relational Model. (b) Contrast the following terms with an appropriate example: (i) stored attribute v/s derived attribute (ii) en

Cascading, what is cascading? what is rollback cascading? please explain in...

what is cascading? what is rollback cascading? please explain in detail

Information Technology, What benefits can a company gain by managing its ow...

What benefits can a company gain by managing its own information infrastructure and servicea

Database design, Build a database application for a sports league. Assume y...

Build a database application for a sports league. Assume your application is to keep track of teams and equipment that is checked out to teams. Explain the steps that is needed and

What is a homogeneous distributed database, What is a homogeneous distribut...

What is a homogeneous distributed database? In homogeneous distributed databases, all sites have the same database management system software, are aware of one another, and agr

What is data model explain object and data base models, What is data model?...

What is data model? Explain object based and record based data models? Ans: A data model is an abstract model in which describes how data is represented and accessed. (i)

Define cardinality and participation constraints, Define cardinality and pa...

Define cardinality and participation constraints on a relationship type, completeness constraint on generalization.        Ans: Cardinality defines the number of entities to wh

Write a program within embedded sql to associative relation, Write a progra...

Write a program within embedded SQL to associative the total trip expenses of the salesman named ‘John' for the relations. EXEC SQL BEGIN DECLARE SECTION; long total_expenses;

Single and multi valued attributes, Attributes having a one value for a par...

Attributes having a one value for a particular entity. For instance, Age is a single valued attribute of a student entity. Attributes  that  have  more  than  single  values

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd