MIS 3353 Database Management Final Exam
Questions With 100% Correct Answers
Order |of |Clauses |- |CORRECT |ANSWER✔✔-SELECT
FROM
WHERE
GROUP |BY
HAVING
ORDER |BY
SELECT |clause: |Function |- |CORRECT |ANSWER✔✔-•Indicates |which |fields |should |be |displayed |
in |the |output |for |those |records |that |have |passed |any |tests |given |in |the |WHERE |clause
-All |fields |in |this |clause |must |be |separated |by |a |comma
FROM |clause: |Function |- |CORRECT |ANSWER✔✔-Tells |the |RDBMS |the |name |of |the |table |from |
which |we |wish |to |pull |data |for |our |output
WHERE |clause: |Function |- |CORRECT |ANSWER✔✔-•Reduces |the |set |of |records |that |will |be |
displayed |in |the |output.
-If |all |records |in |a |table |should |be |shown |in |the |output, |then |this |clause |is |not |needed
GROUP |BY |clause: |Function |- |CORRECT |ANSWER✔✔-This |clause |is |required |if |there |is |an |
aggregate |function |in |the |SELECT |clause |and |any |fields |appear |in |the |SELECT |clause |that |are |
not |part |of |the |aggregate |function
HAVING |clause: |Function |- |CORRECT |ANSWER✔✔-•This |clause |is |very |similar |to |the |WHERE |
clause, |except |that |it |applies |to |grouped |data |formed |as |the |result |of |an |aggregate |function |
rather |than |individual |records
, -Unless |there |is |a |GROUP |BY |clause |in |the |query, |this |clause |shouldn't |be |used
ORDER |BY |clause: |Function |- |CORRECT |ANSWER✔✔-This |clause |tells |the |DBMS |the |order |in |
which |to |rank |the |results |to |be |returned |by |the |SELECT |statement
Examples |of |Analytical |Functions |- |CORRECT |ANSWER✔✔--TOP |1
- |DISTINCT
Examples |of |Aggregate |Functions |- |CORRECT |ANSWER✔✔--SUM
-COUNT
-AVG
LIKE |- |CORRECT |ANSWER✔✔-•Another |option |when |evaluating |text |in |a |WHERE |clause
-Matches |text |strings |or |partial |text |strings
WHERE...LIKE |and |Wildc*rd |examples |- |CORRECT |ANSWER✔✔-•WHERE |FirstName |LIKE |'Ge*
-Returns |any |record |where |the |FirstName |value |starts |with |the |letters |"Ge" |(this |would |include
|a |value |that |was |just |"Ge" |with |nothing |thereafter.
•WHERE |FirstName |LIKE |'*nk'
-returns |any |record |where |the |FirstName |value |ends |with |the |letters |"nk" |(including |any |
record |with |a |value |of |just |"nk").
IN |and |NOT |IN |- |CORRECT |ANSWER✔✔-Tell |the |RDBMS |to |compare |the |value |of |a |field |
against |a |list |of |values
WHERE...IN |example |- |CORRECT |ANSWER✔✔-WHERE |MtnName |IN |('Mt. |Rainier', |'Mt. |
Whitney', |'Mt. |Hood', |'Mt. |Washington')
Questions With 100% Correct Answers
Order |of |Clauses |- |CORRECT |ANSWER✔✔-SELECT
FROM
WHERE
GROUP |BY
HAVING
ORDER |BY
SELECT |clause: |Function |- |CORRECT |ANSWER✔✔-•Indicates |which |fields |should |be |displayed |
in |the |output |for |those |records |that |have |passed |any |tests |given |in |the |WHERE |clause
-All |fields |in |this |clause |must |be |separated |by |a |comma
FROM |clause: |Function |- |CORRECT |ANSWER✔✔-Tells |the |RDBMS |the |name |of |the |table |from |
which |we |wish |to |pull |data |for |our |output
WHERE |clause: |Function |- |CORRECT |ANSWER✔✔-•Reduces |the |set |of |records |that |will |be |
displayed |in |the |output.
-If |all |records |in |a |table |should |be |shown |in |the |output, |then |this |clause |is |not |needed
GROUP |BY |clause: |Function |- |CORRECT |ANSWER✔✔-This |clause |is |required |if |there |is |an |
aggregate |function |in |the |SELECT |clause |and |any |fields |appear |in |the |SELECT |clause |that |are |
not |part |of |the |aggregate |function
HAVING |clause: |Function |- |CORRECT |ANSWER✔✔-•This |clause |is |very |similar |to |the |WHERE |
clause, |except |that |it |applies |to |grouped |data |formed |as |the |result |of |an |aggregate |function |
rather |than |individual |records
, -Unless |there |is |a |GROUP |BY |clause |in |the |query, |this |clause |shouldn't |be |used
ORDER |BY |clause: |Function |- |CORRECT |ANSWER✔✔-This |clause |tells |the |DBMS |the |order |in |
which |to |rank |the |results |to |be |returned |by |the |SELECT |statement
Examples |of |Analytical |Functions |- |CORRECT |ANSWER✔✔--TOP |1
- |DISTINCT
Examples |of |Aggregate |Functions |- |CORRECT |ANSWER✔✔--SUM
-COUNT
-AVG
LIKE |- |CORRECT |ANSWER✔✔-•Another |option |when |evaluating |text |in |a |WHERE |clause
-Matches |text |strings |or |partial |text |strings
WHERE...LIKE |and |Wildc*rd |examples |- |CORRECT |ANSWER✔✔-•WHERE |FirstName |LIKE |'Ge*
-Returns |any |record |where |the |FirstName |value |starts |with |the |letters |"Ge" |(this |would |include
|a |value |that |was |just |"Ge" |with |nothing |thereafter.
•WHERE |FirstName |LIKE |'*nk'
-returns |any |record |where |the |FirstName |value |ends |with |the |letters |"nk" |(including |any |
record |with |a |value |of |just |"nk").
IN |and |NOT |IN |- |CORRECT |ANSWER✔✔-Tell |the |RDBMS |to |compare |the |value |of |a |field |
against |a |list |of |values
WHERE...IN |example |- |CORRECT |ANSWER✔✔-WHERE |MtnName |IN |('Mt. |Rainier', |'Mt. |
Whitney', |'Mt. |Hood', |'Mt. |Washington')