VERIFIED AND CORRECT ANSWERS
GRADED A+
outer join - ANS-excludes nonmatching rows (no cross product style)
types of outerjoin - ANS-1. full outer join (has everything matched & unmatched)
2. one sided outer join
SYNTAX of one sided outer join - ANS-FROM Tab1 LEFT JOIN Tab2
ON PK=FK
SYNTAX of Full outer join - ANS-FULL JOIN
ON
other way of doing full join w/ FULL JOIN - ANS-UNION of LEFT and RIGHT
Type I sub-queries are known as - ANS-nested queries
OR
independent sub query
-query inside a query
,where are nested queries usually - ANS-WHERE and HAVING
use Type I nested queries to ---on other tables - ANS-test conditions
-UPDATE/DELETE
UPDATE - ANS-UPDATE table
SET new=new
WHERE ---
Type II sub-queries are similar to
also known as - ANS-nested loops
-correlated sub query
Type II sub-query executes when
-used for which problems - ANS--Executes one time for each row of outer query
-difference problems (NOT EXISTS)
-so dont specify a something youre looking for
Type I difference formulation for same question - ANS-specify type and IN the nested query
process difference of Type I and Type II in difference formulation - ANS-Type II-process each line of outer
query first
Type I - processes sub query first then replaces the subquery with the result
purpose of DISTINCT
-when can you use - ANS-duplicate
-faculty who teach every IS 2016 course
,Nested FROM query - ANS-select from (select from) as T
division operators keywords - ANS--suppliers who supply ALL parts
-faculty who teach EVERY IS course
division operations must be done with what method - ANS-COUNT
multilayer sub-queries with NOT EXISTS (or NOT IN)
division problem: •Compare the number of rows associated with a group to the total number in the
subset of interest - ANS-Type I nested query in HAVING clause
where can an aggregate function not be - ANS-in the where clause, need to either do having or a select
list
Which of the following is not a SQL DML statement? - ANS-CreateTable
If you define a column with a default value, that value is used whenever a row - ANS-that doesn't
include a value for that column is added to the table
If you define a column as an identity column, - ANS-a number is generated for that column whenever a
row is added to the table
The processing that's done by the DBMS is typically referred to as - ANS-back-end processing
Which of the following types of statements isn't an action query? - ANS-Select
To work with the data in a SQL Server database from a .NET application, you can use ADO.NET objects
like - ANS-commands, connections, and data readers
A relational database consists of one or more what? - ANS-tables
, What uniquely identifies each row in a table? - ANS-primary key
Which of the following recommendations won't improve the readability of your SQL statements? - ANS-
Use comments to describe what each statement does.
To relate one table to another, a/an ________________ in one table is used to point to the primary key
in another table. - ANS-foreign key
What is the most common type of relationship between two tables? - ANS-one-to-many
This is typically modeled after a real-world entity, such as an invoice or a vendor. - ANS-table
Although the American National Standards Institute publishes the specifications for a standard SQL
language, each DBMS vendor has its own ________________ of SQL. - ANS-dialect/variant
What SQL dialect does Microsoft SQL Server use? - ANS-Transact-SQL
SQL statements that define the tables in a database are referred to as ________________ statements. -
ANS-Data Definition Language (DDL)
Insert, Update, and Delete statements can be referred to as ________________ queries. - ANS-action
A view is a SELECT statement that is stored with the ________________. - ANS-database
To run a SELECT statement from an application program, you store the statement in the
________________ object for the database connection. - ANS-command
The three main hardware components of a client/server system are the clients, the server, and the
________________. - ANS-network