Self-join, Database Management System

Assignment Help:

Self-Join:  In a self join a table is joined with itself.  Let consider the following sample partial data of EMP table

EMPNO

ENAME

MGRID

.....

1

Nirmal

4

 

2

Kailash

4

 

3

Veena

1

 

4

Boss

NULL

 

.....

.....

...

 

Example: Search the name of each employee's manager name.

SELECT WORKER.ENAME || 'WORK FOR' || MANAGER.ENAME FROM EMP WORKER, EMP MANAGER

WHERE WORKER.MGR=MANAGER.EMPNO;

Output:

                                                                        2033_Self-Join.png


Related Discussions:- Self-join

Domains, Every simple attribute of an entity type have a possible set of va...

Every simple attribute of an entity type have a possible set of values that can be attached to it. This is known as the domain of an attribute. An attribute cannot have a value out

Functional dependency, Functional Dependency Consider a relation R that...

Functional Dependency Consider a relation R that has 2 attributes A and B. The attribute B of the relation is functionally dependent on the attribute A if and only if for every

Case-based online phone repair, please i request for your assistance in de...

please i request for your assistance in developing a case-based online phone repair

Define database management system, Normal 0 false false fal...

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

In a hierarchical model of data records are organized, In a Hierarchical mo...

In a Hierarchical model of data records are organized ? In the hierarchical model of data records are organized as Tree structure.

What is known as heap file organization, What is known as heap file organiz...

What is known as heap file organization? In the heap file organization, any record can be placed anywhere in the file where there is space for the record. There is no ordering

What is dml (data manipulation language)?, This language that enable user m...

This language that enable user manipulate to or access data as organized by appropriate data model. Low level or Procedural DML : DML needs a user to specify what data ar

Give expression in tuple calculus and domain calculus, Consider the subsequ...

Consider the subsequent relation schemes:  Project (Project#, Project_name, chief_architect)  Employee (Emp#, Empname)  Assigned_To (Project#, Emp#)  Give expression i

List out user authorization to modify the database schema, List out various...

List out various user authorization to modify the database schema. a)  Index authorization b)  Resource authorization c)  Alteration authorization d)  Drop authorizat

What are the several kinds of the update operations relation, What are the ...

What are the several kinds of the update operations on relations? Also explain the constraints on these update operation. Give instance in support of your answer. There are th

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