Interview Questions and Answers - Order By Newest This question was recently asked at 'Cognizant (C?TS),Overstock'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  aws rds  aws database  amazon cloud database Asked in 2 Companies Ans. Multi AZ RDS is for disaster recovery and failover whereas Read replicas are for scaling. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  aws rds  aws database  amazon cloud database multi az  aws rds  aws database  amazon cloud database read replicaAns. 5 Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  aws rds  aws database  amazon cloud database  aws rds  aws database  amazon cloud database read replicaAns. Fast reads
Much more reads than writes Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  aws dynamodb  aws nosql database  amazon cloud nosql databaseAns. Compute Node Hours
Backup
Data Transfer Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  aws data warehouse  aws database  aws redshift Q106. create an SQL query across multiple tables involving outer joins Database
Ans. Select * from table1 t1Left outer join table2 t2 on t1.tid = t2.id Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  sql query  database  outer joins Asked in 2 Companies Q107. Difference between composite , primary and unique key ? Database
This question was recently asked at 'Thomson reuters'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Ans. No Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  aws dynamodb  aws nosql database  amazon cloud nosql database Q109. What is the minimum number of tables required to perform a SQL join? Database
Ans. 1 , We can do self join
Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  sql join Asked in 1 Companies Q110. Sort an Employee Object based on Name or Age Database
Ans. Use Comparable or Comparator interface Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  sql query Asked in 1 Companies Q111. Create DB schema for Employee, Department. Database
This question was recently asked at 'RiseSmart India,RiseSmart'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  db schema  database schema  database design Asked in 2 Companies Q112. Differences between MongoDB and mysql. Database
This question was recently asked at 'RiseSmart'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q113. Write SQL query to join 2 tables ? SQL
Ans. Select * from table1 join Select * from table2 Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  database Asked in 1 Companies This question was recently asked at 'Eurofins IT Solutions'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q115. Explain Working of joins in sql. Database
This question was recently asked at 'InfoGain'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q116. How can we increase the speed of SQL queries ? Database
Ans. Using -
1. Prepared Statements
2. Using Indices
3. Using whereby clause only on indexed columns Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q117. What is a composite primary key and foreign key ? Database
Ans. The combination of values from multiple columns in the composite primary key must be unique for each row in the table.
A foreign key, on the other hand, is a field or set of fields in one table that refers to the primary key in another table. It establishes a relationship between two tables based on the values of the foreign key and the primary key. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q118. differences between drop , delete and truncate Database
This question was recently asked at 'HCL Technologies'.This question is still unanswered. Can you please provide an answer. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve   Asked in 1 Companies Q119. How would you design the database schema for an event? Database
Ans. Broad question, but if the company need velocity, think about use a NO SQL instead of regular SQL databases.
Also prefers materialized views instead of joins to fetch data quickly.
Regarding the database design, there are very good design tools for professional database (to develop proper indexes and good database design) one of the best is QuickDBD Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  database design  database schema Asked in 1 Companies Q120. What is the main difference between unique key and primary key ? Database
Ans. Primary key will not accept NULL values whereas Unique key can accept one NULL value.
A table can have only primary key whereas there can be multiple unique key on a table.
A Clustered index automatically created when a primary key is defined whereas Unique key generates the non-clustered index. Help us improve. Please let us know the company, where you were asked this question : Like Discuss Correct / Improve  Unique Key  Primary Key Asked in 1 Companies Q121. What is Dirty Read in Database Transactions ? Database
a. Data Read by Transaction 2 which hasn't yet updated by Transaction 1 b. Data Read by Transaction 2 which has been updated and commited by Transaction 1 c. Data Read by Transaction 2 which has been updated but not commited by Transaction 1 d. Inability of Transaction 2 to read Data when Transaction 1 is updating.Ans.c. Data Read by Transaction 2 which has been updated but not commited by Transaction 1
Q122. In majority of the cases, the following join will give maximum number of results ? Reference Database
a. Inner Join b. Outer Join c. Left Join d. Right JoinAns.b. Outer Join
a. Left Join and Right Join gives equal number of Results b. Outer Join and Inner Join gives equal number of Results c. Inner Join gives maximum number of results records d. Inner Join gives minimum number of result recordsAns.d. Inner Join gives minimum number of result records
Q124. Which of the following is not true for Prepared Statements ? Database
a. Prepared Statements provides better performance b. Prepared Statements prevent SQL Injection attacks c. Prepared Statements provide ORM capabilities d. Prepared Statement provides DB side cachingAns.c. Prepared Statements provide ORM capabilities