Core Database Concepts and SQL

Test your knowledge of fundamental database management system concepts including SQL transactions, normalization forms, table joins, and query writing with date functions.

5 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Which of the following commands is used to make all the changes permanent in a transaction?

  1. Commit
  2. Rollback
  3. Save
  4. Savepoint
  5. Set transaction
Question 2 Multiple Choice (Single Answer)

A relational schema in BCNF(3.5 NF) can still have which of the following dependencies?

  1. Partial dependency
  2. Transitive dependency
  3. Multivalued dependency
  4. Join dependency
  5. Both 3 and 4
Question 3 Multiple Choice (Single Answer)

Which of the following joins is implicitly employed on two tables, when nothing is specified?

  1. Outer join
  2. Inner join
  3. Cartesian join
  4. Left inner join
  5. Right inner join
Question 4 Multiple Choice (Single Answer)

Which of the following commands is used to delete the transaction and undo all the changes?

  1. Commit
  2. Rollback
  3. Undo
  4. Cancel transaction
  5. None of these
Question 5 Multiple Choice (Single Answer)

Consider the following table.

empid empname joiningdate
1 John 2013-08-10
2 Micky 2012-08-10

Write a query to retrieve all th employee names, who have worked for more than 200 days.

  1. select empname from emp where datediff(curdate(),joiningdate)>20;
  2. select empname from emp where datediff(curdate(),joiningdate)>200;
  3. select empname from emp where datediff(joiningdate,curdate())>200;
  4. select from emp where datediff(curdate(),joiningdate)>200;
  5. none of these