Advanced Database Midterm Exam

50 Questions | Total Attempts: 470

SettingsSettingsSettings
Please wait...
Database Quizzes & Trivia

You are now heading for the midterm exam and one of the topics you covered is advanced databases. How conversant are you with the new technologies involving databases and their use? Take up the quiz to ensure you do not fail that exam. All the best as you prepare for it.


Related Topics
Questions and Answers
  • 1. 
    Restrict the rows that are returned by using the _________ clause
    • A. 

      SELECT

    • B. 

      WHERE

    • C. 

      FROM

    • D. 

      LIKE

  • 2. 
    How many columns are presented after executing this query:SELECT address1||','||address2||','||address2 "Adress" FROM employee;
    • A. 

      1

    • B. 

      2

    • C. 

      3

    • D. 

      4

  • 3. 
    Character values are ______________, and datevalues are _____________.
    • A. 

      Format-sensitive, case-sensitive

    • B. 

      Format-insensitive, case-insensitive

    • C. 

      Case-sensitive, format-sensitive

    • D. 

      Case-insensitive, format-insensitive

  • 4. 
    The default date format is
    • A. 

      MM-DD-RR

    • B. 

      DD-MON-RR

    • C. 

      RR-MON-DD

    • D. 

      MON-DD-RR

  • 5. 
    Which of the following BEST describes the sql statements:SELECT employee_id, last_name, job_id, department_idFROM employeesWHERE department_id = 90
    • A. 

      The SELECT statement retrieves the information of all employees who are in department 90

    • B. 

      The SELECT statement retrieves the employee ID, name, job ID, and department number of all employees who are in department 90

    • C. 

      The SELECT statement retrieves the employee's ID who are in department 90

    • D. 

      The SELECT statement retrieves the values from employees table with department 90

  • 6. 
    Character strings and date values are enclosed by _____________.
    • A. 

      Double quotation marks

    • B. 

      Single quotation marks

    • C. 

      Asterisks

    • D. 

      AS keyword

  • 7. 
    Which of the following operator does NOT represent the NOT EQUAL expression:
    • A. 

      !=

    • B. 

      ^=

    • C. 

    • D. 

      *=

  • 8. 
    These are used in conditions that compare one expression to another value or expression.
    • A. 

      Logical conditions

    • B. 

      Comparison conditions

    • C. 

      Arithmetic conditions

    • D. 

      Weather conditions

  • 9. 
    Which of the following BEST describes the sql statements:SELECT last_name, salaryFROM employeesWHERE salary <= 3000 ;
    • A. 

      The SELECT statement retrieves values from EMPLOYEES table whose salary is less than or equal to 3,000.

    • B. 

      The SELECT statement retrieves the last name and salary from the EMPLOYEES table for any employee whose salary is less than or equal to 3,000.

    • C. 

      The SELECT statement retrieves the EMPLOYEES table for any employee whose salary is less than or equal to 3,000.

    • D. 

      The SELECT statement retrieves the last name and salary from the EMPLOYEES table for any employee whose salary is less than 3,000.

  • 10. 
    Values that are specified with the BETWEEN condition are inclusive.
    • A. 

      True

    • B. 

      False

  • 11. 
    This condition is used to test for values in a specified set of values.
    • A. 

      AS

    • B. 

      IN

    • C. 

      BETWEEN

    • D. 

      LIKE

  • 12. 
    Which of the following BEST describes the sql statements:SELECT employee_id, last_name, salary, manager_idFROM employeesWHERE manager_id IN (100, 101, 201) ;
    • A. 

      It displays employee numbers, last names, salaries, and manager’s employee numbers for all the employees whose manager’s employee number is 100, 101, or 201

    • B. 

      It displays all the employees whose manager’s employee number is 100, 101, or 201

    • C. 

      It displays employee numbers, last names, salaries, and manager’s employee numbers for all the employees whose manager’s employee number is from 100 to 201

    • D. 

      It displays employee numbers, last names, salaries, and manager’s employee numbers for all the employees whose manager’s employee number is btween 100 and 201

  • 13. 
    Use the _________ condition to perform wildcard searches of valid search string values.
    • A. 

      AS

    • B. 

      LIKE

    • C. 

      SAME

    • D. 

      WHERE

  • 14. 
    This symbol represents any sequence of zero or more characters for wildcard search.
    • A. 

      %

    • B. 

      _

    • C. 

      *

    • D. 

      #

  • 15. 
    This symbol represents any single character for wildcard search.
    • A. 

      %

    • B. 

      _

    • C. 

      *

    • D. 

      #

  • 16. 
    The ESCAPE option identifies the _______________ as the escape character.
    • A. 

      /

    • B. 

      \

    • C. 

      *

    • D. 

      #

  • 17. 
    The ___________ condition tests for nulls.
    • A. 

      NULLS?

    • B. 

      IS NULLS

    • C. 

      ISNULL

    • D. 

      IS NULL

  • 18. 
    This returns TRUE if both component conditions are true
    • A. 

      AND

    • B. 

      OR

    • C. 

      NOT

    • D. 

      XOR

  • 19. 
    This returns TRUE if either component condition is true
    • A. 

      AND

    • B. 

      OR

    • C. 

      NOT

    • D. 

      NOT OR

  • 20. 
    This returns TRUE if the following condition is false
    • A. 

      AND

    • B. 

      OR

    • C. 

      NOT

    • D. 

      NOT OR

  • 21. 
    A _________condition combines the result of two component conditions to produce a single result based on those conditions, or it inverts the result of a single condition.
    • A. 

      Relational

    • B. 

      Test

    • C. 

      Arithmetic

    • D. 

      Logical

  • 22. 
    You can use several conditions in one WHERE clause using the AND and OR operators.
    • A. 

      True

    • B. 

      False

  • 23. 
    All character searches are case-insensitive.
    • A. 

      True

    • B. 

      False

  • 24. 
    Which of the following BEST describes the sql statements:SELECT last_name, job_idFROM employeesWHERE job_idNOT IN ('IT_PROG', 'ST_CLERK', 'SA_REP') ;
    • A. 

      It displays the last name and job ID of all employees whose job ID is IT_PROG, ST_CLERK, or SA_REP.

    • B. 

      It displays the last name and job ID of all employees whose job ID is not IT_PROG, ST_CLERK, or SA_REP.

    • C. 

      It displays the last name and job ID of all employees whose job ID is not between IT_PROG, ST_CLERK, or SA_REP.

    • D. 

      It displays the last name and job ID of all employees whose job ID is between IT_PROG, ST_CLERK, or SA_REP.

  • 25. 
    The rules of precedence determine the order in which expressions are evaluated and calculated
    • A. 

      True

    • B. 

      False

  • 26. 
    Which of the following will be evaluated first based on the rule of precedence?
    • A. 

      Arithmetic operators

    • B. 

      Concatenation operator

    • C. 

      Comparison conditions

    • D. 

      BETWEEN operator

  • 27. 
    Which of the following will be evaluated first based on the rule of precedence?
    • A. 

      NOT logical condition

    • B. 

      AND logical condition

    • C. 

      OR logical condition

    • D. 

      Not equal to

  • 28. 
    You can use _____________ to override rules of precedence.
    • A. 

      Commas

    • B. 

      Hyphens

    • C. 

      Parenthesis

    • D. 

      Double qoutations

  • 29. 
    The ____________ clause can be used to sort the rows.
    • A. 

      SORT BY

    • B. 

      ARRANGE

    • C. 

      ORDER BY

    • D. 

      ORDER IN

  • 30. 
    If you use the ORDER BY clause, it must be the last clause of the SQL statement.
    • A. 

      True

    • B. 

      False

  • 31. 
    It make the basic query block more powerful, and they are used to manipulate data values.
    • A. 

      Methods

    • B. 

      Functions

    • C. 

      Procedures

    • D. 

      Tasks

  • 32. 
    These functions operate on single rows only and return one result per row.
    • A. 

      Uni-Row Functions

    • B. 

      Single-Row Functions

    • C. 

      One-Row Functions

    • D. 

      Unique-Row Functions

  • 33. 
    These functions can manipulate groups of rows to give one result per group of rows.
    • A. 

      Multiple-Row Functions

    • B. 

      Group Functions

    • C. 

      Both a and b

    • D. 

      None of these

  • 34. 
    A function that accepts character input and can return both character and number values
    • A. 

      Symbol

    • B. 

      Character

    • C. 

      String

    • D. 

      Char

  • 35. 
    A function that converts alpha character values to lowercase
    • A. 

      LOWERCASE()

    • B. 

      LCASE()

    • C. 

      LOWER()

    • D. 

      LOCASE()

  • 36. 
    A function that converts alpha character values to uppercase
    • A. 

      UPPER()

    • B. 

      UPPERCASE()

    • C. 

      UCASE()

    • D. 

      UPCASE()

  • 37. 
    A function that converts alpha character values to uppercase for the first letter of each word; all other letters in lowercase
    • A. 

      INITCASE()

    • B. 

      ICASE()

    • C. 

      ICAP()

    • D. 

      INITCAP()

  • 38. 
    A function that concatenates the first character value to the second character value; equivalent to concatenation operator (||)
    • A. 

      COMBINE()

    • B. 

      CONCAT()

    • C. 

      CONCATENATE()

    • D. 

      CONC()

  • 39. 
    A function that returns the number of characters in the expression
    • A. 

      SIZE()

    • B. 

      LENGTH()

    • C. 

      LEN()

    • D. 

      STRLEN()

  • 40. 
     A function that returns the numeric position of a named string.
    • A. 

      INST()

    • B. 

      INSTR()

    • C. 

      STRLEN

    • D. 

      STRPOS()

  • 41. 
    This function enables you to trim heading or trailing characters (or both)from a character string.
    • A. 

      TRACK()

    • B. 

      TRACE()

    • C. 

      TRIM()

    • D. 

      HTRIM()

  • 42. 
    This function searches a text expression for a character string and, if found, replaces it with a specified replacement string
    • A. 

      RPLACE()

    • B. 

      REPLACE()

    • C. 

      REMOVE()

    • D. 

      SEARCH()

  • 43. 
    What is the output of the following statement:LPAD(salary,10,'*')
    • A. 

      ***2400***

    • B. 

      *2*4*6*8*0

    • C. 

      *****24000

    • D. 

      24000*****

  • 44. 
    What is the output of the following statement:RPAD(salary,5,'#')
    • A. 

      40000

    • B. 

      ####1

    • C. 

      40##

    • D. 

      4###

  • 45. 
    It is a dummy table that you can use to view results from functions and calculations.
    • A. 

      DUO

    • B. 

      DUAL

    • C. 

      DOUBLE

    • D. 

      DUMMY

  • 46. 
    The _________ function rounds the column, expression, or value to n decimal places.
    • A. 

      TRUNC()

    • B. 

      ROUND()

    • C. 

      ROFF()

    • D. 

      ROUNDOFF()

  • 47. 
    The ____________ function truncates the column, expression, or value to n decimal places.
    • A. 

      TRUNCATE()

    • B. 

      TRUNC()

    • C. 

      ROUND()

    • D. 

      DROUND()

  • 48. 
    The _________ function finds the remainder of the first argument divided by the second argument.
    • A. 

      MOD()

    • B. 

      MODULO()

    • C. 

      MODULUS()

    • D. 

      REMAINDER()

  • 49. 
    The default date display format is ____________.
    • A. 

      MON-DD-RR

    • B. 

      RR-DD-MON

    • C. 

      DD-MON-RR

    • D. 

      MM-DD-RR

  • 50. 
    It is a function that returns the date and time
    • A. 

      SYSDATETIME

    • B. 

      SYSTIME

    • C. 

      SYSDATE

    • D. 

      DATETIME