Database - Interview Questions and Answers for 'Accenture' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Database - Interview Questions and Answers for 'Accenture' - 7 question(s) found - Order By Newest

Frequently asked in Cognizant ( Based on 2 feedback )
  Q1. What are Inner , Outer , Left and Right Joins in SQL ?Database
Ans. Inner join is the intersection of two tables on the condition defined by the where clause i.e will get records from both tables matched by a column.

Outer join is the union of two tables i.e will get all records from both tables and will put null in the columns where related records are not present.

Left Outer join is the left union of two tables i.e all records from the table on the left and values from the right table for related records else null for the columns from right table.

Right Outer join is the right union of two tables i.e all records from the table on the right and values from the left table for related records else null for the columns from left table.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     sql  inner join  outer join  right join  left join     Asked in 24 Companies      basic        frequent


  Q2. What is a self Join and give an example of a self Join ?

or

What is self Join and What is it's purpose ?
Database
Ans. When a Table Join itself , it's a Self Join. For example - we like to know the pair of department names where first dept has lesser employees than the later.

Select D1.name , D2.name from Dept D1, Dept D2 where D1.employee_count < D2.employee_count

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     sql  joins  self join  self-join  Pair of employee names with first having lesser salary than later  Pair of department names where first dept has lesser employees than the later     Asked in 26 Companies      basic        frequent


  Q3. What is database Normalization ?Database
Ans. https://en.wikipedia.org/wiki/Database_normalization

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     normalization  database     Asked in 35 Companies      intermediate        frequent


 Q4. Difference between JDBC and Hibernate ?Database
Ans. JDBC is a standard Java Api for Database communication whereas Hibernate is an ORM framework that uses JDBC to connect with Database.

Hibernate is another layer of object table mapping over JDBC that provide a database independent, object oriented and an efficient way of database communication.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     JDBC  Hibernate  JDBC vs Hibernate     Asked in 3 Companies


 Q5. How to delete duplicate elements in a table ?Database
Ans. DELETE FROM TABLE WHERE ROW_NUM NOT IN ( SELECT MAX(ROW_ID) FROM TABLE GROUP BY DUPLICATE_FIELD )

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 3 Companies


 Q6. Write a SQL to delete duplicate records in a tableDatabase
Ans. DELETE FROM TABLE WHERE ROW_NUM NOT IN ( SELECT MAX(ROW_ID) FROM TABLE GROUP BY DUPLICATE_FIELD )

or

DELETE FROM TABLE a WHERE ROW_ID >(SELECT MIN(ROW_ID FROM TABLE b WHERE a.DUPLICATE_FIELD=b.DUPLICATE_FIELD);

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve          Asked in 3 Companies


 Q7. Design a Database Schema to store Employee Information with each employee having multiple addresses. Database
Ans. We can have 2 entities i.e EMPLOYEE and ADDRESS and can have a relationship Table , EMPLOYEE_ADDRESS having one to may relationship between the two.

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     database schema   design     Asked in 2 Companies



Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: