INFO 2410 Quiz Reviews for Exam 2 UVU
Which is the best data type for attributes called "ProdictPrice?"
Money
For some reports it will be useful to see the results in alphabetial order. Which command will produce an alphabetical list?
Order by column_name Asc
When coded in a WHERE clause, which search condition will return invoices when PaymentDate is not null and InvoiceTotal is greater than or equal to $500?
PaymentDate IS NOT NULL AND InvoiceTotal >= 500
Which of the following is the term for database design adapted to the features and limitations of the database management system?
Physical design
_____________________ integrity exists when a value from a foreign key can be entered only if the corresponding value already exists in the origination table.
Referential
In standard SQL, which symbol is used to describe any character or characters in pattern matches?
%
To return all of the columns from the base table, you can code the ___________ operator in the SELECT clause.
*
To concatenate character strings, you use the _____________ operator in a string expression.
+
Which of the following is important to consider when choosing a database management system?
1. Compatibility with your software and hardware 2. Hardware and software requirements 3. and Familiarity and expertise of staff
A table in 2NF must also be in
1NF
A table is in __________________ if every nonkey column depends on the entire key, not just part of it.
2NF
To be in 3NF a table must already be in _______________, and every nonkey column must depend on nothing but the _________________
2NF, Key
Which of the following best defines a data dictionary?
A document that describes all database objects and their structures, including data types
If you are writing a query which has two conditions, both of which must be true, you would need to use which type of Boolean operator to connect the two conditions?
AND
Which of the following provides the best definition for unicode?
An expanded character set that includes nonLatin characters
Which of the following is a fixed character type?
Char
To sort the records that are retrieved by a SELECT statement in descending sequence by InvoiceTotal, you code _________ after ORDER BY InvoiceTotal.
DESC
To prevent duplicate rows from being returned by a SELECT statement, you can code the __________________ keyword in the SELECT clause.
DISTINCT
What is the portion of SQL used to select and edit data?
DML
The _______________ diagram shows the relationships between the tables
ERD
What is the best test to use as a condition when writing a query for missing data?
Is Null
Which of the following is true of a fixed character data type?
It always writes the same number of characters to disk and It is less efficient in terms of disk storage
Which of the following describes some of the advantages of enforcing referential integrity?
It prevents orphan data and It protects against bad or meaningless data
Which of the following is true of sample data?
It should be complete enough to test business rules AND It should contain some exceptions or even errors to test how the database deals with those
Which of the following is true of a variable character data type?
It uses more processor time
To retrieve rows in which an expression matches a string pattern called a mask, you can use the ______________ keyword followed by the mask.
LIKE
Text comparisons are usually made with the ____________________ operator for pattern matching
Like
A union combines the rows from two or more _______________________.
SELECT statements
When you code a SELECT statement, you must code the four main clauses in the following order
SELECT, FROM, WHERE, ORDER BY
Which of the following best defines the term null?
The absence of a value
When you code a union that combines two result sets, which of the following is NOT true?
The result sets must be derived from different tables.
In standard SQL, which symbol is used to describe exacrly one character in pattern matches?
Underscore
What is the difference of Union and Join?
Union combines the results of two SQL queries when there is the same number of columns and data types; Join returns rows when there is at least one column match.
What would be the correct syntax for a WHERE clause to return all the NULL vlaues in the Customer_Phone column?
WHERE Customer_Phone IS NULL
Which of the following best describes the effect of enforcing referential integrity on updates?
You cannot change a primary key that has related records in a foreign key table
Which of the following best describes the effect of enforcing referential integrity on inserts?
You cannot enter data into a foreign key table unless it is related to an existing record in the primary key table
what is the effect of enforcing referential integrity on deletes?
You cannot remove a record from the primary key table if it has related records in the foreign key table.
In a cross join, all of the rows in the first table are joined with
all the combunations of the rows in the second table
What is the definition of the term null?
an absence of a value
Which of the following shows how you would begin to make a table in SQL?
create table
When tables lose information because data is not stored in a proper format
deletion anomaly
It prevents orphen data and it protects against bad or meaningless data
enforcing referential integrity
In most cases, the join condition of an inner join uses the _______________ operator to compare two keys.
equal
In most cases, the join condition of an inner join compares the primary key of one table to the ____________________ key of another table.
foreign key
The ________________ clause of the SELECT statement names the table that contains the data to be retrieved.
from
If you want to join all of the rows in two tables whether or not they are matched, you use a/an _______________ join.
full
When you code a union with the INTERSECT keyword to combine two result sets, the union
includes only rows that occur in both result sets
Code example 4-1 SELECT VendorName AS Vendor, InvoiceDate AS Date FROM Vendors AS V JOIN Invoices AS I ON V.VendorID = I.VendorID (Refer to code example 4-1.) This type of join is called a/an __________________ join.
inner
In SQL tables are connected with a ___________________ statement
join
If you want to join all of the rows in the first table of a SELECT statement with just the matched rows in a second table, you use a/an _______________ join.
left
When splitting a table, conforming to first normal form, the original key must be brought over into every new table created so the tables can be ______________ together later.
linked or joined
To override the order of precedence in an arithmetic expression, you can use __________________.
parentheses
You don't ever need to code a right outer join because
right outer joins can be converted to left outer joins by changing the order of the tables in the statement
A full outer join includes rows that satisfy the join condition, plus
rows in both tables that do not satisfy the join condition
A full outer join includes rows that satisfy the join condition, plus
rows in both tables that don't satisfy the join condition
In a cross join, all of the rows in the first table are joined with all of the
rows in the second table
First normal form solves the problem of repeating groups by _________________________ the table
splitting
Code example 4-2 SELECT VendorName, InvoiceNumber FROM Invoices LEFT JOIN Vendors ON Invoices.VendorID = Vendors.VendorID (Refer to code example 4-2.) The total number of rows returned by this query must equal
the number of rows in the Invoices table
SELECT VendorName, InvoiceNumber FROM Invoices LEFT JOIN Vendors ON Invoices.VendorID = Vendors.VendorID (Refer to code example 4-2.) If the LEFT keyword is replaced with the RIGHT keyword, the total number of rows that are returned must equal
the number of rows in the Vendors table
When identifying columns in different tables when the same column name is used in more than one table you must ___________________.
use table.column name
Varchar and NVarchar represent what kind of character types
variable length
In a join, column names need to be qualified only
when the same names are used in both tables