23.05.2017 Views

CIS 336 DeVry Complete Quiz Package

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>CIS</strong> <strong>336</strong> <strong>DeVry</strong> <strong>Complete</strong> <strong>Quiz</strong> <strong>Package</strong><br />

Downloading is very simple, you can download this Course here:<br />

http://wiseamerican.us/product/cis-<strong>336</strong>-devry-complete-quiz-package/<br />

Or<br />

Contact us at:<br />

SUPPORT@WISEAMERICAN.US<br />

<strong>CIS</strong> <strong>336</strong> <strong>DeVry</strong> <strong>Complete</strong> <strong>Quiz</strong> <strong>Package</strong><br />

<strong>CIS</strong><strong>336</strong><br />

<strong>CIS</strong> <strong>336</strong> <strong>DeVry</strong> Week 2 <strong>Quiz</strong> Latest<br />

Question 1. Question : (TCO 2) Which statement is FALSE regarding a primary key?<br />

o<br />

o<br />

o<br />

o<br />

Only parent tables must have a primary key.<br />

The values must be unique.<br />

It can be made up of multiple attributes.<br />

The value cannot be NULL.<br />

Question 2. Question : (TCO 2) _____ integrity insures that the value of a foreign key must match a primary key<br />

value in the table to which it is related, or be null.<br />

o<br />

o<br />

o<br />

o<br />

Referential<br />

Entity<br />

Data<br />

Logical<br />

Question 3. Question : (TCO 2) A verb associating two nouns in a business rule usually translates to a(n) ____<br />

in the data model.<br />

o<br />

o<br />

o<br />

o<br />

entity<br />

attribute<br />

relationship<br />

constraint<br />

Question 4. Question : (TCO 4) A(n) _____ provides a graphical description of a data model.<br />

o<br />

o<br />

o<br />

o<br />

entity relationship diagram<br />

data dictionary<br />

business rule<br />

pseudocode<br />

Question 5. Question : (TCO 2) A _____ primary key is made up of more than one attribute.<br />

o<br />

o<br />

o<br />

o<br />

composite<br />

foreign<br />

bridge<br />

linking


Question 6. Question : (TCO 4) In the figure below, the OrderLineItems entity is there to implement what type<br />

of relationship between Orders and Products?<br />

o<br />

o<br />

o<br />

o<br />

One to one<br />

One to many<br />

Many to many<br />

No relationship<br />

Question 7. Question : (TCO 2) When designing a database, you should _____.<br />

o<br />

o<br />

o<br />

o<br />

make sure entities are in normal form before table structures are created<br />

create table structures then normalize the database<br />

only normalize the database when performance problems occur<br />

consider more important issues, such as performance, before normalizing<br />

Question 8. Question : (TCO 2) A table that is in 1NF and includes no partial dependencies only is said to be in<br />

_____.<br />

o<br />

o<br />

o<br />

o<br />

1NF<br />

2NF<br />

3NF<br />

BCNF<br />

Question 9. Question : (TCO 2) A table is not in 1NF if _____.<br />

o<br />

o<br />

o<br />

o<br />

it has a primary key defined<br />

all of the key attributes are defined<br />

there are repeating groups in the table<br />

all attributes are dependent on the primary key<br />

Question 10. Question : (TCO 2) Entity attributes and primary keys are not present in the _____ data model.<br />

o<br />

o<br />

o<br />

o<br />

logical<br />

physical<br />

conceptual<br />

network<br />

<strong>CIS</strong> <strong>336</strong> <strong>DeVry</strong> Week 3 <strong>Quiz</strong> Latest<br />

1. Question : (TCO 3) The _____ column attribute will automatically generate unique numbers in sequence.<br />

o<br />

o<br />

o<br />

o<br />

DEFAULT<br />

AUTO_INCREMENT<br />

AUTO_SEQUENCE<br />

NOT NULL<br />

Question 2. Question : (TCO 5) The _____ keyword is used in an ALTER statement to remove a column from<br />

an existing table.<br />

o<br />

o<br />

o<br />

o<br />

MODIFY COLUMN<br />

ADD COLUMN<br />

DELETE COLUMN<br />

DROP COLUMN


Question 3. Question : (TCO 3) Which uses the least amount of storage?<br />

o<br />

o<br />

o<br />

o<br />

“Example” stored in a column of type CHAR(20)<br />

“Exam” stored in a column of type CHAR(20)<br />

“Ex” stored in a column of type CHAR(20)<br />

They all use the same amount of storage.<br />

Question 4. Question : (TCO 3) The TIME data type in MySQL can store _____.<br />

o<br />

o<br />

o<br />

o<br />

dates only<br />

times only<br />

dates and times<br />

None of the above<br />

Question 5. Question : (TCO 3) Which statement is false regarding the creation of a foreign key constraint at<br />

table level or with an ALTER statement?<br />

o<br />

o<br />

o<br />

o<br />

The parent table must already exist.<br />

The field must already be defined in the table.<br />

The PK and FK fields must have the same name.<br />

The PK and FK fields may have different names.<br />

Question 6. Question : (TCO 3) A foreign key constraint can only reference a column in another table that has<br />

been assigned a(n) _____ constraint.<br />

o<br />

o<br />

o<br />

o<br />

NOT NULL<br />

UNIQUE<br />

PRIMARY KEY<br />

DEFAULT<br />

Question 7. Question : (TCO 3) You are creating a table called Department, with fields for the primary key DeptID<br />

(Integer) and department name (VARCHAR). What (if anything) is wrong with the following code?<br />

CREATE TABLE Department ( deptID Primary Key INTEGER , deptName NOT NULL VARCHAR(10) );<br />

o<br />

o<br />

o<br />

o<br />

You must use curly braces, not parentheses.<br />

The data type must immediately follow the field name.<br />

The keywords cannot be in upper case.<br />

Nothing is wrong.<br />

Question 8. Question : (TCO 3) What datatype is best to store a person’s age?<br />

o<br />

o<br />

o<br />

o<br />

INTEGER<br />

VARCHAR<br />

DECIMAL<br />

FLOAT<br />

Question 9. Question : (TCO 5) Which statement will remove the field STATUS from the CUSTOMERS table?<br />

o<br />

o<br />

o<br />

o<br />

ALTER TABLE customers REMOVE status;<br />

ALTER TABLE customers DROP status;<br />

ALTER TABLE customers DROP COLUMN status;<br />

ALTER TABLE customers DELETE status;<br />

Question 10. Question : (TCO 8) When you write an INSERT statement with a column list, which columns can<br />

be omitted from the column list?


o<br />

o<br />

o<br />

o<br />

AUTO_INCREMENT only<br />

DEFAULT only<br />

NOT NULL only<br />

AUTO_INCREMENT, DEFAULT, and fields that allow NULL<br />

<strong>CIS</strong> <strong>336</strong> <strong>DeVry</strong> Week 4 <strong>Quiz</strong> Latest<br />

Question 1. Question : (TCO 6) To retrieve all fields from a table, use<br />

o SELECT ALL.<br />

o SELECT ANY.<br />

o SELECT ().<br />

o SELECT *.<br />

Question 2. Question : (TCO 6) Which operator would be most appropriate to determine books with a retail price<br />

in the range of $50 to $100?<br />

o LIKE<br />

o IN<br />

o BETWEEN<br />

o ><br />

Question 3. Question : (TCO 6) Which code returns the date field HIREDATE in the format: Friday, April 5th,<br />

2015?<br />

o<br />

o<br />

o<br />

o<br />

DATE_FORMAT(HIREDATE, '%W, %m %d, %Y')<br />

DATE_FORMAT(HIREDATE, '%a, %M %D, %Y')<br />

DATE_FORMAT(HIREDATE, '%W, %M %D, %Y')<br />

DATE_FORMAT(HIREDATE, '%a, %m %d, %y')<br />

Question 4. Question : (TCO 6) Given a customer table with fields for firstname and lastname, which of the<br />

following will display the customer name as a single field in the format “Jones, Tom” with a heading?<br />

o<br />

o<br />

o<br />

o<br />

SELECT CONCAT(lastname, firstname) as “Name” FROM customer;<br />

SELECT CONCAT(firstname, lastname) as “Name” FROM customer;<br />

SELECT CONCAT(lastname, ‘, ‘, firstname) as “Name” FROM customer;<br />

SELECT CONCAT lastname ‘, ‘ firstname as “Name” FROM customer;<br />

Question 5. Question : (TCO 8) The column to be updated by the UPDATE command is specified in the _____<br />

clause.<br />

o<br />

o<br />

o<br />

o<br />

WHERE<br />

MODIFY<br />

ALTER<br />

SET<br />

Question 6. Question : (TCO 6) Given a table orders with fields for orderid, orderdate, and shipdate, which query<br />

will display the ordered for only those orders that have not shipped?<br />

o<br />

o<br />

o<br />

o<br />

SELECT orderid FROM orders WHERE shipdate = orderdate;<br />

SELECT orderid FROM orders WHERE shipdate IS NOT NULL;<br />

SELECT orderid FROM orders WHERE shipdate IS NULL;<br />

SELECT orderid FROM orders;


Question 7. Question : (TCO 6) Which WHERE clause will return data on all employees with a last name<br />

beginning with ‘S’?<br />

o<br />

o<br />

o<br />

o<br />

WHERE lastname = ‘S’<br />

WHERE lastname = ‘S%’<br />

WHERE lastname LIKE ‘S’<br />

WHERE lastname LIKE ‘S%’<br />

Question 8. Question : (TCO 6) Given a books table with fields of title, cost, and retail, what if anything is wrong<br />

with the following query (assuming all fields exist)?<br />

SELECT * FROM books WHERE cost > 20 ORDER BY retail;<br />

o<br />

o<br />

o<br />

o<br />

You must sort and filter on the same field.<br />

You cannot use ORDER BY and WHERE in the same query.<br />

The WHERE clause must always be last.<br />

Nothing is wrong.<br />

Question 9. Question : (TCO 8) You can delete one or more rows in a table by using the _____ command.<br />

o<br />

o<br />

o<br />

o<br />

UPDATE<br />

DROP<br />

DELETE<br />

ALTER<br />

Question 10. Question : (TCO 6) Given a books table with fields: title, category (such as ‘SPORTS’), cost, retail;<br />

what condition will return ‘COMPUTER’ books with a retail price between $50 and $100 ?<br />

o WHERE retail > 50 AND < 100 AND category = ‘COMPUTER’<br />

o WHERE category = ‘COMPUTER’ AND (retail BETWEEN 100 and 50)<br />

o WHERE category = ‘COMPUTER’ AND retail < 50 AND retail > 100<br />

o WHERE category = ‘COMPUTER’ AND ( retail BETWEEN 50 AND 100)<br />

<strong>CIS</strong> <strong>336</strong> <strong>DeVry</strong> Week 5 <strong>Quiz</strong> Latest<br />

1. Question : (TCO 7) The implicit inner join syntax is defined as _____.<br />

o<br />

o<br />

o<br />

o<br />

NATURAL JOIN<br />

JOIN ON<br />

JOIN USING<br />

WHERE clause<br />

Question 2. Question : (TCO 7) To join four tables would require _____ join conditions.<br />

o 4<br />

o 3<br />

o 2<br />

o Cannot tell without an ERD.<br />

Question 3. Question : (TCO 7) Given the two tables described below, which of the following JOIN queries (if<br />

any) is not correct?<br />

customer: with the fields customerid(PK), lastname, firstname


order: with the fields orderid(PK), orderdate, customerid(FK)<br />

o<br />

o<br />

o<br />

o<br />

SELECT lastname, orderdate from customer JOIN order ON customer.customerid = order.customerid;<br />

SELECT lastname, orderdate from customer JOIN order USING (customerid);<br />

SELECT lastname, orderdate from customer, orders;<br />

All of the above<br />

Question 4. Question : (TCO 7) In a join, column names need to be qualified only<br />

o<br />

o<br />

o<br />

o<br />

in inner joins.<br />

in outer joins.<br />

when the code is confusing.<br />

when the same column names exist in both tables.<br />

Question 5. Question : (TCO 7) A left join returns<br />

o<br />

o<br />

o<br />

o<br />

rows in the left table that don’t satisfy the join condition.<br />

unmatched rows from both the left and right tables.<br />

rows in the right table that don’t satisfy the join condition.<br />

the Cartesian product of the two tables.<br />

Question 6. Question : (TCO 7) When you use the USING keyword for a join<br />

o<br />

o<br />

o<br />

o<br />

the join cannot be an outer join.<br />

the join cannot be based on more than one column.<br />

the join must be based on a column or columns that have the same name in both tables.<br />

the join must be an inner join.<br />

Question 7. Question : (TCO 7) Consider the ERD below. How many tables would be required to create a query<br />

to display the customer first and last name along with orderdate of each order they placed?<br />

o<br />

o<br />

o<br />

o<br />

One<br />

Two<br />

Three<br />

Four<br />

Question 8. Question : (TCO 7) Consider the ERD below. What tables will be needed to create a report showing<br />

the firstname and lastname of customers who have placed an order for any product with keyboard in the description?<br />

o<br />

o<br />

o<br />

o<br />

customer, product only<br />

customer, order, product only<br />

customer, orderline only<br />

customer, order, orderline, product<br />

Question 9. Question : (TCO 7) Consider the ERD below. What tables will be needed to create a report showing<br />

customer first and last name along with order date? The report should show all customers even if they have never<br />

placed an order.<br />

o SELECT firstname, lastname, orderdate from customer LEFT JOIN order;<br />

o SELECT firstname, lastname, orderdate FROM customer RIGHT JOIN order ON customer.customerid =<br />

order.customerid;<br />

o SELECT firstname, lastname, orderdate FROM customer JOIN order USING (customerID);<br />

o SELECT firstname, lastname, orderdate FROM customer LEFT JOIN order ON customer.customerid =<br />

order.customerid;


Question 10. Question : (TCO 7) Consider the ERD below. Note that there are some products produced inhouse<br />

that do not require a vendor, thus their vendorID is NULL. Also note that not all vendors currently supply products.<br />

Which query would be used to generate a report showing vendorname and productname, and will include ALL vendors<br />

even if they do not currently supply any products?<br />

o SELECT vendorname, productname FROM vendor LEFT JOIN product;<br />

o SELECT vendorname, productname FROM vendor RIGHT JOIN product;<br />

o SELECT vendorname, productname FROM vendor LEFT JOIN product ON vendor.vendorID =<br />

product.vendorID;<br />

o SELECT vendorname, productname FROM vendor RIGHT JOIN product ON vendor.vendorID =<br />

product.vendorID;<br />

<strong>CIS</strong> <strong>336</strong> <strong>DeVry</strong> Week 6 <strong>Quiz</strong> Latest<br />

1. Question : (TCO 7) Which is NOT an aggregate function?<br />

o<br />

o<br />

o<br />

o<br />

SUM<br />

COUNT<br />

ROUND<br />

MAX<br />

Question 2. Question : (TCO 7) Which of the following statements is correct?<br />

o<br />

o<br />

o<br />

o<br />

WHERE operates on groups formed by aggregate functions and HAVING operates on individual rows.<br />

WHERE can only be used along with HAVING.<br />

HAVING can only be used along with WHERE.<br />

WHERE operates on individual rows and HAVING operates on groups formed by aggregate functions.<br />

Question 3. Question : (TCO 7) Given the books table described below, which of the following will display the<br />

date of the book with the earliest publication date?<br />

books: bookid(PK), ISBN, title, pubdate, cost, retail, category, pubid(FK)<br />

o<br />

o<br />

o<br />

o<br />

SELECT MIN(pubdate) FROM books;<br />

SELECT title FROM books WHERE pubdate = MIN(pubdate);<br />

SELECT title FROM books WHERE pubdate < MIN(pubdate);<br />

SELECT pubdate from books WHERE MIN(pubdate) IS NOT NULL;<br />

Question 4. Question : (TCO 7) Given the books table described below, which of the following will display the<br />

title and retail price of books that are priced higher than the average retail price of all books?<br />

books: bookid(PK), ISBN, title, pubdate, cost, retail, category, pubid(FK)<br />

o<br />

o<br />

o<br />

o<br />

SELECT title, retail FROm books WHERE retail IN (SELECT AVG(retail) FROM books);<br />

SELECT title, retail FROM books WHERE retail > (SELECT AVG(retail) FROM books);<br />

SELECT title, retail FROM books WHERE retail > AVG(retail);<br />

SELECT title, AVG(retail) FROM books;<br />

Question 5. Question : (TCO 7) Which of the values listed below can be returned by a subquery referenced as<br />

follows?<br />

WHERE vendorid = (subquery)<br />

o<br />

o<br />

A single value<br />

A column of one or more rows


o<br />

o<br />

A table<br />

A subquery can’t be used in this way.<br />

Question 6. Question : (TCO 7) What type of subquery is executed once for each row processed by the main<br />

query?<br />

o<br />

o<br />

o<br />

o<br />

Correlated<br />

Uncorrelated<br />

Inner<br />

Outer<br />

Question 7. Question : (TCO 7) Given the two tables described below, which of the following queries will display<br />

the names of the customers with orders shipped after December 1, 2014?<br />

customer: with the fields customerid(PK), lastname, firstname<br />

order: with the fields orderid(PK), orderdate, shipdate, customerid(FK)<br />

o<br />

o<br />

o<br />

o<br />

SELECT lastname, firstname FROM customer WHERE customerid = (SELECT customerID FROM order<br />

WHERE shipdate > ‘2014-01-12’);<br />

SELECT lastname, firstname FROM customer WHERE customerid = (SELECT customerID FROM order<br />

WHERE shipdate < ‘2014-01-12’);<br />

SELECT lastname, firstname FROM customer WHERE customerid = (SELECT customerID FROM order<br />

WHERE shipdate > ‘2014-12-01’);<br />

SELECT lastname, firstname FROM customer WHERE customerid = (SELECT customerID FROM order<br />

WHERE shipdate < ‘2014-12-01’);<br />

Question 8. Question : (TCO 7) Given the two tables described below, which of the following queries will display<br />

each customerid along with the number of orders placed by that customer?<br />

customer: with the fields customerid(PK), lastname, firstname<br />

order: with the fields orderid(PK), orderdate, shipdate, customerid(FK)<br />

o<br />

o<br />

o<br />

o<br />

SELECT customerid, COUNT(customerid) FROM order;<br />

SELECT customerid, COUNT(ordered) FROM order;<br />

SELECT customerid, COUNT(orderid) FROM order GROUP BY customerid;<br />

SELECT customerid, COUNT(orderid) FROM order GROUP BY orderid;<br />

Question 9. Question : (TCO 7) Given the books table described below, which of the following will display each<br />

category along with the average retail price of books in that category?<br />

books: bookid(PK), ISBN, title, pubdate, cost, retail, category, pubid(FK)<br />

o<br />

o<br />

o<br />

o<br />

SELECT AVG(retail) FROM books;<br />

SELECT category, AVG(retail) FROM books GROUP BY category:<br />

SELECT category, AVG(retail) FROM books HAVING category;<br />

SELECT category, SUM(retail) FROM books GROUP BY category;<br />

Question 10. Question : (TCO 7) The expression below will be TRUE for what values of x?<br />

x > ALL(5, 9)<br />

o 5 and below<br />

o 5 to 9<br />

o 5 and above<br />

o 9 and above

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!