Normalization
Database Security
Data Integrity & JOINS
SQL I
SQL II
100
An insertion anomaly occurs when _____.
You cannot enter data because other data is required
100
An action granted to a user is a _____.
Permission
100
Which of the following provides the best definition for “Unicode”? –A 255-character set common to all computers –An expanded character set that includes non-Latin characters –A character set that uses one byte per character –An expanded character set that includes non-English characters
An expanded character set that includes non-Latin characters
100
Which of the following is the best data type for ProductPrice in the example below? ProductPrice 12.44 - nvarchar - Decimal - Currency - Boolean
What is Decimal
100
What is the command you would use to begin to make a table in SQL?
What is CREATE TABLE
200
What best defines First Normal Form?
Removes repeating groups and arrays from entities
200
What is the term for assigning permissions to a validated user?
Authorization
200
You cannot remove a record from the primary key table until you have removed all related records from the foreign key table. Which action is most affected by this rule? - Insert - Update - Delete - Remove
What is Delete
200
Which of the following is the portion of SQL used to create and alter data objects? –Data manipulation language –Data definition language –Declarative language –Procedural language
What is DDL (Data definition language)
200
Which of the following would be the correct syntax for a WHERE clause to return all the NULL values in the CustomerPhone column? –WHERE CustomerPhone=NULL –WHERE CustomerPhone < NULL –WHERE CustomerPhone IS NULL –WHERE CustomerPhone IS NOT NULL
WHERE CustomerPhone IS NULL
300
What best defines Second Normal Form?
Removes functional dependencies from entities
300
Which of the following is a built-in database role that allows a user to read any data in the database? - db_viewer - db_writer - db_owner - db_user
What is db_owner
300
You cannot change a foreign key value unless the value you are changing it to already exists in the primary key table. Which action is most affected by this rule? - Insert - Update - Delete - Remove
What is Update
300
Which of the following best defines the term “scalar function”? - A function that operates on one row at a time - A function that operates on a set of rows at a time - A date-time function - A function that operates on one column at a time
A function that operates on one row at a time
300
Which of the following best describes the function of the term DISTINCT in a SELECT clause? –It returns only one row in the result. –It returns only unique instances of a particular column. –It doesn't have any effect. –It returns only unique rows in the results.
It returns only unique rows in the results.
400
What is the best definition for normal forms?
A set of rules for removing anomalies and redundancies from database design
400
Which of the following is a database account mapped to a server account? - Login - User - Stored procedure - View
What is User
400
Which type of join returns all the records from one table and only the related records from the other table?
Outer Join
400
What would be the effect of the following DELETE statement? DELETE FROM Session WHERE SessionDate < GETDATE( )
It would remove all the rows from session where the SessionDate was less than the current date.
400
What does the SQL clause ORDER BY CustomerLastName DESC do?
Orders the customers by last name Z-A
500
An update anomaly occurs when _____.
You must edit the same information in several places
500
What best defines a disaster recovery plan?
A plan preparing for database and business recovery after any of a variety of disasters
500
Which type type of join matches each row of the first table with every row of the second table?
What is a Cross Join
500
What is the error in the following SQL statement? SELECT CustomerCity, Count(CustomerKey) FROM Customer GROUP BY CustomerCity WHERE Count(CustomerCity) > 20
You cannot use a WHERE clause when the criteria contains an aggregate function.
500
What would be returned by this query criterion? WHERE CustomerCity = 'Seattle' AND CustomerLastName LIKE 'M%’
All the customers in Seattle whose last names start with M