DATABASE | SQL | SQL INTERVIEW QUESTION AND ANSWERS 8 | WHAT IS A TUPLE? | WHAT IS MEANT BY EMBEDDED SQL? | WHAT IS FUNCTIONAL DEPENDENCY? | WHAT ARE THE DIFFERENT PHASES OF TRANSACTION? | WHAT THE DIFFERENCE BETWEEN UNION AND UNIONALL? | WHAT IS DIFFRENCE BETWEEN CO-RELATED SUB QUERY AND NESTED SUB QUERY?

Sql Interview Question and Answers:

43.     What is a tuple?
      A tuple is an instance of data within a relational database.

44.     What is meant by embedded SQL?
      They are SQL statements that are embedded with in application program and are prepared during the program preparation process before the program is executed. After it is prepared, the statement itself does not change(although values of host variables specified within the statement might change).

45.     What is Functional Dependency?
      A Functional dependency is denoted by X Y between two sets of attributes X and Y that are subsets of R specifies a constraint on the possible tuple that can form a relation state r of R. The constraint is for any two tuples t1 and t2 in r if t1[X] = t2[X] then they have t1[Y] = t2[Y]. This means the value of X component of a tuple uniquely determines the value of component Y.

46.     What are the different phases of transaction?   
          The different phases of transaction are
    Analysis phase
    Redo Phase
    Undo phase

47.     What the difference between UNION and UNIONALL?
      Union will remove the duplicate rows from the result set while Union all does’nt.

48.     What is diffrence between Co-related sub query and nested sub query?
 Correlated subquery runs once for each row selected by the outer query. It contains a reference to a value from the row selected by the outer query.

Nested subquery runs only once for the entire nesting (outer) query. It does not contain any reference to the outer query row.

No comments:

Post a Comment