Self-join, Database Management System

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

Posted Date: 3/11/2013 2:39:35 AM | Location : United States







Related Discussions:- Self-join, Assignment Help, Ask Question on Self-join, Get Answer, Expert's Help, Self-join Discussions

Write discussion on Self-join
Your posts are moderated
Related Questions
Benefits: It limits data access. It makes difficult queries look easy. It permits data independence. It presents dissimilar views of the similar data.

What are the disadvantages of file-processing system?  Ans: The Disadvantages of File-Processing System a. Data redundancy and inconsistency - Data redundancy means not nece

Describe the definition of a transaction in SQL  Ans: The SQL transaction starts implicitly. Transactions are finished by either Commit work that commits the transaction and st

You are required to implement integrity constraints within the database to enforce the following requirements:  For Projects: Start date must be supplied. Start date cannot be i

what do you understand by enhanced entity-relationship

In Database software have only pure security or some dis secured by administrator?

What are the components of storage manager? The storage manager components include a) Authorization and integrity manager b) Transaction manager c) Buffer manager d

i want notes on this topic

State about the Tables- DBMS Data is stored in columns and rows (much like a spreadsheet -main difference is how data is organised). Every row in a table is known as a record

write a short note on participation role? Participation role: roles are indicating in E-R diagram by labelling the lines that connect diamonds to rectangles.