mahesh pandekarq


{ City } pune
< Country > india
* Profession * software engineear
User No # 85675
Total Questions Posted # 0
Total Answers Posted # 3

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 3
Users Marked my Answers as Wrong # 1
Questions / { mahesh pandekarq }
Questions Answers Category Views Company eMail




Answers / { mahesh pandekarq }

Question { 6377 }

waht is meant data independence?


Answer

If you change internal low level abstraction database then they dont affect on higl level abstraction.
There are two types of data independance:
1) Physical data independance:
If you change physical level of data then they dont affect on logical level.

2) Logical data independance:
If you change logical level of data then they dont affect on view level

Summary: The ability to modify the schema defination in one level should not affect the schema defination in next higher level.

Is This Answer Correct ?    2 Yes 0 No

Question { NIIT, 4978 }

i have a table like this
Eno ename
1 a
2 b
3 c

i want to display ename and bossname from table
hint boss is also an employee


Answer

/---- You need one more column to view manager of each emp
suppose Mno is the column which contains corresponding Eno
as manager id--

select emp.ename , mgr.ename from empTable as emp
SELF JOIN empTable as mgr on emp.Mno = mgr.Eno

Is This Answer Correct ?    0 Yes 0 No


Question { 6024 }

i need to know how i display department which has salary >
=5000 for the below table
Department
-----------
salary deptname
1000 a
3000 a
2000 b
3000 b
4000 c
5000 c

kindly send the query to thilakvinoth13@gmail.com


Answer

Hi dear,
1) If you have need name of total salary of each department to spend on employee(Understand like this) then use query:
select deptname, SUM(salary)
from Department
GROUP BY deptname
HAVING SUM(salary) >= 5000;

2) Otherwise

SELECT deptname
FROM Department
WHERE salary >= 5000;

Is This Answer Correct ?    1 Yes 1 No