SQL Test Answer Part-03

 

21. What does MOD () function do?

  1. Returns the remainder after division
  2. Modifies the column definition
  3. Modifies the definition of a table
  4. None of the above

Answer: a. Returns the remainder after division

22. Which of the following statement is correct regarding table creation?

  1. Tables once created cannot not be modified to add columns
  2. Constraints can only be given while table creation
  3. One can easily create a table from a given table
  4. When a table is created from another table, all the constrains are copied as well
  5. The width of the columns cannot be modified
  6. Columns cannot be removed from a table

Answer: c. one can easily create a table from a given table

23. Which operator will be evaluated first in the following statement;

Select (age + 3*4/2-8) from emp

  1. +
  2. /
  3. *

Answer: d. *

24. If E1 and E2 are relational algebra expressions, then which of the following is NOT a relational algebra expression?

  1. E1 U E2
  2. E1 / E2
  3. E1 – E2
  4. E1 x E2

Answer: b. E1 / E2

25. The overall logical structure of a database can be expressed graphically by:

  1. Data Flow Chart
  2. Flow Chart
  3. Directed Chart
  4. Entity-Relationship Diagram
  5. None of the above

Answer: d. Entity-Relationship Diagram

26. When the rows from two tables are concatenated according to a specified condition, the operation is known as:

  1. Intersection
  2. Difference
  3. Restriction
  4. Product
  5. Join
  6. Union
  7. Minus

Answer: e. Join

27. What is the collection of information stored in a database at a particular moment called?

  1. Schema
  2. Instance
  3. Table
  4. Cluster
  5. View
  1. Index
  2. None of the above

Answer: b. Instance

28. What are the columns of a table called in a relational model?

  1. Attributes
  2. Rows
  3. Tuples
  4. Constrains
  5. Keys
  6. Indexes
  7. Sets
  8. Elements

Answer: a. Attributes

29. What is the order of precedence among the following operators?

1. IN

2. NOT

3. AND

4. OR

  1. 1,2,3,4
  2. 2,3,4,1
  3. 1,2,4,3
  4. 1,4,3,2
  5. 4,3,2,1
  6. 4,1,2,3
  7. 4,2,1,3
  8. 3,2,1,4

Answer: a. 1,2,3,4 (IN NOT AND OR)

30. An RDBMS performs the following steps:

1) It calculates the results of the group functions of each group
2) It groups those rows together based on the group by clause
3) It orders the groups based on the results of the group functions in the order by clause
4) It chooses and eliminates groups based on the having clause
5) It chooses rows based on the where clause
Arrange the above steps in the correct order of execution:

a. 4,3,5,1,2

b. 4,5,3,2,1

c. 5,2,1,4,3

d. 5,2,3,4,1

e. 2,3,1,4,5

f. 2,3,1,5,4

g. 1,2,3,4,5

h. 3,2,1,4,5

Answer: c. 5, 2,1,4,3

 

Comments

comments

Leave a Comment

Time limit is exhausted. Please reload CAPTCHA.