DATABASE FUNDAMENTALS 98-364
(examslabs) EXAM LATEST WITH ACTUAL
QUESTIONS AND CORRECT VERIFIED ANSWERS
ALREADY GRADED A+ 100%GUARANTEED
PASS!
What data type can store characters of alphanumeric
data and supports multiple languages with minimal
storage space requirements? - .....ANSWER ...✔✔ An
NVARCHAR data type can store alphanumeric data and
supports multiple languages, but requires minimal
storage.
An NVARCHAR data type stores Unicode strings of
different lengths. Unicode strings should be used to
provide multilingual support. The storage required for
an NVARCHAR data type is the maximum number of
bytes to be stored multiplied by two.
What does DML stand for? - .....ANSWER ...✔✔ Data
Manipulation Language
,2|Page
What are DML statements used for? - .....ANSWER
...✔✔ DML statements are used to retrieve, add,
change, or delete data in a database.
You would include a HAVING clause in a query to: -
.....ANSWER ...✔✔ Filter the results after grouping.
You would include a HAVING clause in a query to filter
the results grouped by a GROUP BY clause. First, the
WHERE clause is applied to filter the result set. Then, the
GROUP BY clause is applied to group the results. After
grouping is done, the HAVING clause is evaluated to
specify a condition that is checked after grouping has
occurred to further restrict the results. A HAVING clause
can only reference aggregate functions or columns that
are also specified in the GROUP BY clause. For
example, suppose you have the following query:
SELECT LocationName
FROM Instructor INNER JOIN Location
ON Instructor.LocationID = Location.LocationID
WHERE Status = 'Part-time'
GROUP BY LocationName
HAVING COUNT(*) < 10
,3|Page
This query uses an INNER JOIN in the FROM clause to
join the two tables together. An INNER JOIN clause is
used to display only rows that meet the criteria
specified in the ON clause. The WHERE clause is used to
filter the rows before they are grouped by location so
that only Part-time instructors are retrieved. After the
WHERE clause is applied, the rows are grouped by
location using a GROUP BY clause so that the number of
part-time instructors for each location can be
determined. Finally, the HAVING clause is applied to
filter the results to include only the locations that have
less than ten part-time instructors.
You have a database that has an OrderDetails table
containing one or more rows for each order. Each order
is sequentially assigned an OrderID to identify the
order.
You execute the following query against the
OrderDetails table:
SELECT TOP 20 OrderID, SUM(LineTotal) AS OrderTotal
FROM OrderDetails
GROUP BY OrderID
ORDER BY OrderTotal DESC
, 4|Page
What is the result? - .....ANSWER ...✔✔ The result is
the 20 orders with the highest total. The GROUP BY
clause allows you to perform an aggregate calculation
over rows that have a matching value in a column. In this
case, the statement groups all rows associated with a
specific order and sums the values in the LineTotal
column for each order. The ORDER BY clause is specified
after the GROUP BY clause and orders the results in
descending order by the total summed value by
including the alias for the summed value and the DESC
keyword. The ORDER BY clause can only reference
aggregate values, identified with or without an alias, or
a column referred to in the GROUP BY clause. Then, the
TOP clause returns the first 20 rows in the ordered
result, which in this case would be the 20 orders with the
highest total.
When a view definition contains a join: - .....ANSWER
...✔✔ DML can be performed using the view, but only
on a single base table.
A single UPDATE, INSERT, or DELETE statement can only
modify, add, or remove data from one base table at a
time.
You have a database table named TransactionHistory
that contains millions of rows. The table has a primary