Home > Story > Friends

CIS336 (Introduction to Database w/LAB – Oracle) Complete Class

By Anne Newton | Category :: Story

CIS336 (Introduction to Database w/LAB – Oracle) Complete Class

https://homeworklance.com/downloads/cis336-introduction-to-database-wlab-oracle-complete-class/

CIS336 (Introduction to Database w/LAB – Oracle) Complete Class
cis336 Full courses ( Discussion + ilab +Quiz+ Courses Project and Final Exam)


CIS336A Week 1 Discussion DQ 1 & DQ 2

DQ 1

Normal Forms and Entity Relationship Diagrams (graded)

We hear the term database all the time. Give some examples of databases that you interact with on a regular basis. What makes a database relational? What is a file storage system? How does a relational database differ from a file storage system?


DQ 2

Lab Forum (graded)

This area is used to discuss the lab assignments and techniques. Please post any questions you have about the labs or tips that you have discovered during your learning process. At a minimum, post at least three notes that highlight your experience or problems with this week’s lab.


CIS336A Week 2 Discussion DQ 1 & DQ 2

DQ 1

Developing a Good Data Model (graded)

The database data model is the communication link between the designer, applications programmer, and user. Contribute your views on what constitutes a good data model and why.

DQ 2


Lab Forum (graded)

This area is used to discuss the lab assignments and techniques. Please post any questions you have about the labs or tips that you have discovered during your learning process. At a minimum, post at least three notes that highlight your experience or problems with this week’s lab.


CIS336A Week 3 Discussion DQ 1 & DQ 2

DQ 1

Building the Physical Model (graded)

What is the importance of constraints in a physical model? What role do different constraints play in maintaining referential integrity and data integrity?


DQ 2


Lab Forum (graded)

This area is used to discuss the lab assignments and techniques. Please post any questions you have about the labs or tips that you have discovered during your learning process. At a minimum, post at least three notes that highlight your experience or problems with this week’s lab.

CIS336A Week 4 Discussion DQ 1 & DQ 2

DQ 1

Understanding the SELECT statement (graded)

Reports are generated using queries to a database. The SELECT statement is used to retrieve data from one or many tables in a database. Just as in other programming languages, understanding the syntax of a select statement is key. Let’s first discuss the key clauses in a SELECT statement and the purpose of each.


DQ 2

Lab Forum (graded)

This area is used to discuss the lab assignments and techniques. Please post any questions you have about the labs or tips that you have discovered during your learning process. At a minimum, post at least three notes that highlight your experience or problems with this week’s lab.


CIS336A Week 5 Discussion DQ 1 & DQ 2

DQ 1


Getting Data From Multiple Tables (graded)

It is not uncommon to have to retrieve data that resides in several tables, especially when formulating a report. Discuss some of the performance issues when querying three or four tables at a time.


DQ 2

Lab Forum (graded)

This area is used to discuss the lab assignments and techniques. Please post any questions you have about the labs or tips that you have discovered during your learning process. At a minimum, post at least three notes that highlight your experience or problems with this week’s lab.


CIS336A Week 6 Discussion DQ 1 & DQ 2

DQ 1

How Group Functions Differ From Single-Row Functions (graded)

What are some examples of group functions, and how do they differ from single-row functions?


DQ 2


Lab Forum (graded)

This area is used to discuss the lab assignments and techniques. Please post any questions you have about the labs or tips that you have discovered during your learning process. At a minimum, post at least three notes that highlight your experience or problems with this week’s lab.


CIS336A Week 7 Discussion DQ 1 & DQ 2

DQ 1

Database Views (graded)

What are the advantages of selecting data from a view over selecting data from a base table?


DQ 2

Lab Forum (graded)

This area is used to discuss the lab assignments and techniques. Please post any questions you have about the labs or tips that you have discovered during your learning process. At a minimum, post at least three notes that highlight your experience or problems with this week’s lab.


cis336 week ALL ilab

devry cis336 week 1 ilab laest 2016 march


iLab> Required Software
Lab 1 of 7: Normal Forms and Entity Relationship Diagrams (xx points)
Listen
What’s this?
iLab Overview
Scenario/Summary
Download the iLab instructions and the Answer Sheet for the necessary steps to be completed for this lab. They can be found below. You will notice that the readings, including lectures, the examples we worked on during the lecture, and other audio and visual aids provided, will help you tackle this week’s lab. Remember to always follow the instructions to get maximum credit, and use the weekly discussion related to the iLab and the Q & A Forum for additional help. Be specific and state the problem you are having clearly, including what you have done to resolve it, in the discussion.
Microsoft Visio Tutorial—Important Information
Important: Before starting, be sure to review the Logical Modeling Part 1video under Video Library to familiarize you with how to use MS Visio to draw Entity Relationship Diagrams.
Deliverables
NOTE
Submit your assignment to the Dropbox, located at the top of this page. For instructions on how to use the Dropbox, read thesestep-by-step instructions.
(See the Syllabus section “Due Dates for Assignments & Exams” for due dates.)
The deliverable for this lab is a single MS Word document named lab1_solutions_yourname.docx with the answers included for Steps 1–4.
Required Software
Microsoft Office: Word and Visio 2010
Use a personal copy or access the software athttps://lab.devry.edu.
All Steps
Lab Steps
STEP 1: Download the Week 1 Lab Instructions
Follow the instructions to complete the lab by downloading the following files:
• CIS336Lab1_Instructions.docx
• CIS336Lab1_StudentAnswerSheet.docx
STEP 2: Submit Your Answers on the Lab 1 Student Answer Sheet
Use Visio or Word to draw the dependency diagrams for Steps 1–3. Use Visio to draw the ERD for Step 4.
This is the end of iLab #1


devry cis336 week 2 ilab

iLab> Lab Steps
Lab 2 of 7: The Expanded Entity Relationship Diagram
What’s this?
iLab Overview
Scenario/Summary
Download the iLab instructions and the Answer Sheet for the necessary steps to be completed for this lab. They can be found below. You will notice that the readings, including lectures, the examples we worked on during the lecture, and other audio and visual aids provided, will help you tackle this week’s lab. Remember to always follow the instructions to get maximum credit, and use the weekly discussion related to the iLab and the Q & A Forum for additional help. Be specific and state the problem you are having clearly, including what you have done to resolve it, in the discussion.
Deliverables
NOTE
Submit your assignment to the Dropbox, located at the top of this page. For instructions on how to use the Dropbox, read thesestep-by-step instructions.
(See the Syllabus section “Due Dates for Assignments & Exams” for due dates.)
The deliverable for this lab will be your completed ERD as a single MS Word document using copy/paste from the MS Visio application and namedlab2_solutions_yourname.docx
Required Software
Microsoft Office: Word
Use a personal copy or access the software athttps://lab.devry.edu.
All Steps
Microsoft Office: Visio
Use a personal copy or access the software athttps://lab.devry.edu.
All Steps
Lab Steps
STEP 1: Download the Week 2 Lab Instructions.
Follow the instructions to complete the lab by downloading the following files:
• CIS336Lab2_Instructions.docx
STEP 2: Submit Your Answers
Use Visio to create your ERD. Copy and paste to a Word document as indicated in the lab instructions.
This is the end of lab #2


devry cis336 week 3 ilab

iLab> Lab Steps
Lab 3 of 7: Building the Physical Model
Listen
What’s this?
iLab Overview
Scenario/Summary
Beginning with this lab, and continuing through the remaining weeks you will be doing all of your work in the MySQL EDUPE Environment. By now you have received your logon ID and password and should have at least made sure you can connect. If for any reason you have not done so, please do so now before continuing any further. If for any reason you cannot connect, then you need to let the instructor know ASAP so that any problems can be resolved.
In this lab you will transform a logical database design (data model) into a physical model (tables, constraints, and relationships). Your job will be to take the relationship diagram along with the meta data defined in the data dictionary and define the table structures and constraints to create the physical tables. Once this has been done, you will populate the tables with data. Lastly, you will write SELECT statements to query the tables and verify the data was populated.
Deliverables
NOTE
Submit your assignment to the Dropbox, located at the top of this page. For instructions on how to use the Dropbox, read thesestep-by-step instructions.
(See the Syllabus section “Due Dates for Assignments & Exams” for due dates.)
1. Your script file. Create this file in Notepad,notWord. Make sure your name is in a comment area at the top of the script file. Use a double dash to create a one-line comment.
—Jacob Smith
—Lab 3
Required Software
MySQL
Access the software athttps://devry.edupe.net:8300
Lab Steps
STEP 1: Download the Week 3 Lab Instructions
Complete the lab by downloading the following files this week:
• CIS336Lab3_Instructions.docx
• CIS336Lab3_Files.zip
STEP 2: Submit Your SQL Command File
Use Notepad to write the SQL statements and submit according the lab instructions.
This is the end of Lab #3


devry cis336 week 4 ilab

iLab> STEP 2: Download the Week 4 Lab Instructions and Answer Sheet
Lab 4 of 7: Building the Physical Model
Listen
What’s this?
iLab Overview
Scenario/Summary
Lab 4 will introduce the various aspects of the SQL SELECT statement and the methods of retrieving data from the database tables. The lab will utilize a database with a set of tables that you will create and populate using the instructions and script file found below. These tables will be used for the remaining labs in this class.
Deliverables
NOTE
Submit your assignment to the Dropbox, located at the top of this page. For instructions on how to use the Dropbox, read thesestep-by-step instructions.
(See the Syllabus section “Due Dates for Assignments & Exams” for due dates.)
The deliverable for this lab will include the following.
• The Student Answer Sheet file below provides a place for each query and the output of the query. You will copy and paste this information from your MySQL environment. Be sure your name, course number, and lab number are in your file which will be submitted to the iLab Dropbox for Week 4.
Required Software
Microsoft Office: Word
Use a personal copy or access the software athttps://lab.devry.edu.
All Steps
MySQL
Access the software athttps://devry.edupe.net:8300
Lab Steps
STEP 1: Create the Database and Tables
Create the database and tables (that will be used in labs 4–7) by downloading the following files.
• CreateOMTables.docx(Instructions)
• create_OM_db.sql(Database Script)
STEP 2: Download the Week 4 Lab Instructions and Answer Sheet
Follow the instructions to complete the lab by downloading the following files.
• CIS336Lab4_Instructions.docx
• CIS336Lab4_StudentAnswerSheet.docx
Be sure to refer to the ERD for the database inOM_ERD.docxwhen creating your queries.
STEP 3: Submit Your Answer sheet
Complete the Answer Sheet to show your queries and results and submit according to the lab instructions.
This is the end of Lab#4.


devry cis336 week 5 ilab

iLab> STEP 1: Download the Week 5 Lab Instructions and Answer Sheet
Lab 5 of 7: Retrieving Data From Multiple Tables (39 points)
Listen
What’s this?
iLab Overview
Scenario/Summary
Lab 5 deals with writing queries using multiple tables as covered in the reading and lecture material this week. In some cases, you will be given the option to choose the JOIN syntax to use, in other cases, you will be asked to take a specific approach. Using the incorrect process when the process is specified will result in points being taken off for that problem.
Deliverables
NOTE
Submit your assignment to the Dropbox, located at the top of this page. For instructions on how to use the Dropbox, read thesestep-by-step instructions.
(See the Syllabus section “Due Dates for Assignments & Exams” for due dates.)
The deliverable for this lab will include:
The Student Answer Sheet file that you will download below provides a place for each query and the output of the query. You will copy and paste this information from your MySQL environment. Be sure your name, course number, and lab number are in your file which will be submitted to the iLab Dropbox for Week 5.
Required Software
Microsoft Office: Word
Use a personal copy or access the software athttps://lab.devry.edu.
All Steps
MySQL
Access the software athttps://devry.edupe.net:8300
Lab Steps
PRELIMINARY STEP: If You Have Not Created the Database Yet, Please Complete.
This lab will utilize the tables that were created in Lab 4. If you have not yet created these tables,you can create the database and tables (used in labs 4–7) by downloading the following files.
• CreateOMTables.docx(Instructions)
• create_OM_db.sql(Database Script)
STEP 1: Download the Week 5 Lab Instructions and Answer Sheet
Follow the instructions to complete the lab by downloading the following files.
• CIS336Lab5_Instructions.docx
• CIS336Lab5_StudentAnswerSheet.docx
Be sure to refer to the ERD for the database inOM_ERD.docxwhen creating your queries.
STEP 2: Submit Your Answer sheet
Complete the Answer Sheet to show your queries and results and submit according to the lab instructions.
This is the end of Lab #5.


devry cis336 week 6 ilab

iLab> STEP 1: Download the Week 6 Lab Instructions and Answer Sheet
Lab 6 of 7: Group Functions and Subqueries
Listen
What’s this?
iLab Overview
Scenario/Summary
Lab 6 will introduce group or aggregate functions and subqueries. Make sure to follow the instructions provided by each step.
Deliverables
NOTE
Submit your assignment to the Dropbox, located at the top of this page. For instructions on how to use the Dropbox, read thesestep-by-step instructions.
(See the Syllabus section “Due Dates for Assignments & Exams” for due dates.)
The deliverable for this lab will include the following.
The Student Answer Sheet file that you will download below provides a place for each query and the output of the query. You will copy and paste this information from your MySQL environment. Be sure your name, course number, and lab number are in your file which will be submitted to the iLab Dropbox for Week 5.
Required Software
Microsoft Office: Word
Use a personal copy or access the software athttps://lab.devry.edu.
All Steps
MySQL
Access the software athttps://devry.edupe.net:8300
Lab Steps
PRELIMINARY STEP: If You Have Not Created the Database Yet, Please Complete.
This lab will utilize the tables that were created in Lab 4. If you have not yet created these tables, you can create the database and tables (used in labs 4–7) by downloading the following files.
• CreateOMTables.docx (Instructions)
• create_OM_db.sql (Database Script)
STEP 1: Download the Week 6 Lab Instructions and Answer Sheet
Follow the instructions to complete the lab by downloading the following files.
• CIS336Lab6_Instructions.docx
• CIS336Lab6_StudentAnswerSheet.docx
Be sure to refer to the ERD for the database inOM_ERD.docx when creating your queries.
STEP 2: Submit Your Answer Sheet
Complete the answer sheet to show your queries and results, and submit according to the lab instructions.
This is the end of Lab #6


Devry CIS336 All Week Quiz

Devry CIS336 Week 2 Quiz Latest 2016 March

Devry CIS336 Week 2 Quiz Latest


Question 1. Question : (TCO 2) Which statement is FALSE regarding a primary key?
Only parent tables must have a primary key.
The values must be unique.
It can be made up of multiple attributes.
The value cannot be NULL.

Question 2. Question : (TCO 2) _____ integrity insures that the value of a foreign key must match a primary key value in the table to which it is related, or be null.
Referential
Entity
Data
Logical


Question 3. Question : (TCO 2) A verb associating two nouns in a business rule usually translates to a(n) ____ in the data model.
entity
attribute
relationship
constraint


Question 4. Question : (TCO 4) A(n) _____ provides a graphical description of a data model.
entity relationship diagram
data dictionary
business rule
pseudocode

Question 5. Question : (TCO 2) A _____ primary key is made up of more than one attribute.
composite
foreign
bridge
linking

Question 6. Question : (TCO 4) In the figure below, the OrderLineItems entity is there to implement what type of relationship between Orders and Products?
One to one
One to many
Many to many
No relationship

Question 7. Question : (TCO 2) When designing a database, you should _____.
make sure entities are in normal form before table structures are created
create table structures then normalize the database
only normalize the database when performance problems occur
consider more important issues, such as performance, before normalizing

Question 8. Question : (TCO 2) A table that is in 1NF and includes no partial dependencies only is said to be in _____.
1NF
2NF
3NF
BCNF

Question 9. Question : (TCO 2) A table is not in 1NF if _____.
it has a primary key defined
all of the key attributes are defined
there are repeating groups in the table
all attributes are dependent on the primary key

Question 10. Question : (TCO 2) Entity attributes and primary keys are not present in the _____ data model.
logical
physical
conceptual
network

Devry CIS336 Week 3 Quiz

Devry CIS336 Week 3 Quiz Latest 2016 March

1. Question : (TCO 3) The _____ column attribute will automatically generate unique numbers in sequence.
DEFAULT
AUTO_INCREMENT
AUTO_SEQUENCE
NOT NULL

Question 2. Question : (TCO 5) The _____ keyword is used in an ALTER statement to remove a column from an existing table.
MODIFY COLUMN
ADD COLUMN
DELETE COLUMN
DROP COLUMN

Question 3. Question : (TCO 3) Which uses the least amount of storage?
“Example” stored in a column of type CHAR(20)
“Exam” stored in a column of type CHAR(20)
“Ex” stored in a column of type CHAR(20)
They all use the same amount of storage.

Question 4. Question : (TCO 3) The TIME data type in MySQL can store _____.
dates only
times only
dates and times
None of the above

Question 5. Question : (TCO 3) Which statement is false regarding the creation of a foreign key constraint at table level or with an ALTER statement?
The parent table must already exist.
The field must already be defined in the table.
The PK and FK fields must have the same name.
The PK and FK fields may have different names.

Question 6. Question : (TCO 3) A foreign key constraint can only reference a column in another table that has been assigned a(n) _____ constraint.
NOT NULL
UNIQUE
PRIMARY KEY
DEFAULT

Question 7. Question : (TCO 3) You are creating a table called Department, with fields for the primary key DeptID (Integer) and department name (VARCHAR). What (if anything) is wrong with the following code?
CREATE TABLE Department
(
deptID Primary Key INTEGER ,
deptName NOT NULL VARCHAR(10)
);
You must use curly braces, not parentheses.
The data type must immediately follow the field name.
The keywords cannot be in upper case.
Nothing is wrong.
Question 8. Question : (TCO 3) What datatype is best to store a person’s age?
INTEGER
VARCHAR
DECIMAL
FLOAT

Question 9. Question : (TCO 5) Which statement will remove the field STATUS from the CUSTOMERS table?
ALTER TABLE customers REMOVE status;
ALTER TABLE customers DROP status;
ALTER TABLE customers DROP COLUMN status;
ALTER TABLE customers DELETE status;

Question 10. Question : (TCO 8) When you write an INSERT statement with a column list, which columns can be omitted from the column list?
AUTO_INCREMENT only
DEFAULT only
NOT NULL only
AUTO_INCREMENT, DEFAULT, and fields that allow NULL


Devry CIS336 Week 4 Quiz Latest

Devry CIS336 Week 4 Quiz Latest 2016 March

Question 1. Question : (TCO 6) To retrieve all fields from a table, use
SELECT ALL.
SELECT ANY.
SELECT ().
SELECT *.

Question 2. Question : (TCO 6) Which operator would be most appropriate to determine books with a retail price in the range of $50 to $100?
LIKE
IN
BETWEEN
>

Question 3. Question : (TCO 6) Which code returns the date field HIREDATE in the format: Friday, April 5th, 2015?
DATE_FORMAT(HIREDATE, ‘%W, %m %d, %Y’)
DATE_FORMAT(HIREDATE, ‘%a, %M %D, %Y’)
DATE_FORMAT(HIREDATE, ‘%W, %M %D, %Y’)
DATE_FORMAT(HIREDATE, ‘%a, %m %d, %y’)

Question 4. Question : (TCO 6) Given a customer table with fields for firstname and lastname, which of the following will display the customer name as a single field in the format “Jones, Tom” with a heading?
SELECT CONCAT(lastname, firstname) as “Name” FROM customer;
SELECT CONCAT(firstname, lastname) as “Name” FROM customer;
SELECT CONCAT(lastname, ‘, ‘, firstname) as “Name” FROM customer;
SELECT CONCAT lastname ‘, ‘ firstname as “Name” FROM customer;

Question 5. Question : (TCO 8) The column to be updated by the UPDATE command is specified in the _____ clause.
WHERE
MODIFY
ALTER
SET

Question 6. Question : (TCO 6) Given a table orders with fields for orderid, orderdate, and shipdate, which query will display the ordered for only those orders that have not shipped?
SELECT orderid FROM orders WHERE shipdate = orderdate;
SELECT orderid FROM orders WHERE shipdate IS NOT NULL;
SELECT orderid FROM orders WHERE shipdate IS NULL;
SELECT orderid FROM orders;

Question 7. Question : (TCO 6) Which WHERE clause will return data on all employees with a last name beginning with ‘S’?
WHERE lastname = ‘S’
WHERE lastname = ‘S%’
WHERE lastname LIKE ‘S’
WHERE lastname LIKE ‘S%’

Question 8. Question : (TCO 6) Given a books table with fields of title, cost, and retail, what if anything is wrong with the following query (assuming all fields exist)?
SELECT * FROM books WHERE cost > 20 ORDER BY retail;
You must sort and filter on the same field.
You cannot use ORDER BY and WHERE in the same query.
The WHERE clause must always be last.
Nothing is wrong.

Question 9. Question : (TCO 8) You can delete one or more rows in a table by using the _____ command.
UPDATE
DROP
DELETE
ALTER

Question 10. Question : (TCO 6) Given a books table with fields: title, category (such as ‘SPORTS’), cost, retail; what condition will return ‘COMPUTER’ books with a retail price between $50 and $100 ?
WHERE retail > 50 AND < 100 AND category = ‘COMPUTER’
WHERE category = ‘COMPUTER’ AND (retail BETWEEN 100 and 50)
WHERE category = ‘COMPUTER’ AND retail < 50 AND retail > 100
WHERE category = ‘COMPUTER’ AND ( retail BETWEEN 50 AND 100)


Devry CIS336 Week 5 Quiz

Devry CIS336 Week 5 Quiz Latest 2016 March

1. Question : (TCO 7) The implicit inner join syntax is defined as _____.
NATURAL JOIN
JOIN ON
JOIN USING
WHERE clause

Question 2. Question : (TCO 7) To join four tables would require _____ join conditions.
4
3
2
Cannot tell without an ERD.

Question 3. Question : (TCO 7) Given the two tables described below, which of the following JOIN queries (if any) is not correct?
customer: with the fields customerid(PK), lastname, firstname
order: with the fields orderid(PK), orderdate, customerid(FK)
SELECT lastname, orderdate from customer JOIN order ON customer.customerid = order.customerid;
SELECT lastname, orderdate from customer JOIN order USING (customerid);
SELECT lastname, orderdate from customer, orders;
All of the above

Question 4. Question : (TCO 7) In a join, column names need to be qualified only
in inner joins.
in outer joins.
when the code is confusing.
when the same column names exist in both tables.

Question 5. Question : (TCO 7) A left join returns
rows in the left table that don’t satisfy the join condition.
unmatched rows from both the left and right tables.
rows in the right table that don’t satisfy the join condition.
the Cartesian product of the two tables.

Question 6. Question : (TCO 7) When you use the USING keyword for a join
the join cannot be an outer join.
the join cannot be based on more than one column.
the join must be based on a column or columns that have the same name in both tables.
the join must be an inner join.

Question 7. Question : (TCO 7) Consider the ERD below. How many tables would be required to create a query to display the customer first and last name along with orderdate of each order they placed?
One
Two
Three
Four

Question 8. Question : (TCO 7) Consider the ERD below. What tables will be needed to create a report showing the firstname and lastname of customers who have placed an order for any product with keyboard in the description?
customer, product only
customer, order, product only
customer, orderline only
customer, order, orderline, product

Question 9. Question : (TCO 7) Consider the ERD below. What tables will be needed to create a report showing customer first and last name along with order date? The report should show all customers even if they have never placed an order.
SELECT firstname, lastname, orderdate from customer LEFT JOIN order;
SELECT firstname, lastname, orderdate FROM customer RIGHT JOIN order ON customer.customerid = order.customerid;
SELECT firstname, lastname, orderdate FROM customer JOIN order USING (customerID);
SELECT firstname, lastname, orderdate FROM customer LEFT JOIN order ON customer.customerid = order.customerid;

Question 10. Question : (TCO 7) Consider the ERD below. Note that there are some products produced in-house that do not require a vendor, thus their vendorID is NULL. Also note that not all vendors currently supply products. Which query would be used to generate a report showing vendorname and productname, and will include ALL vendors even if they do not currently supply any products?
SELECT vendorname, productname FROM vendor LEFT JOIN product;
SELECT vendorname, productname FROM vendor RIGHT JOIN product;
SELECT vendorname, productname FROM vendor LEFT JOIN product ON vendor.vendorID = product.vendorID;
SELECT vendorname, productname FROM vendor RIGHT JOIN product ON vendor.vendorID = product.vendorID;


Devry CIS336 Week 6 Quiz


Devry CIS336 Week 6 Quiz Latest 2016 March

1. Question : (TCO 7) Which is NOT an aggregate function?
SUM
COUNT
ROUND
MAX

Question 2. Question : (TCO 7) Which of the following statements is correct?
WHERE operates on groups formed by aggregate functions and HAVING operates on individual rows.
WHERE can only be used along with HAVING.
HAVING can only be used along with WHERE.
WHERE operates on individual rows and HAVING operates on groups formed by aggregate functions.

Question 3. Question : (TCO 7) Given the books table described below, which of the following will display the date of the book with the earliest publication date?
books: bookid(PK), ISBN, title, pubdate, cost, retail, category, pubid(FK)
SELECT MIN(pubdate) FROM books;
SELECT title FROM books WHERE pubdate = MIN(pubdate);
SELECT title FROM books WHERE pubdate < MIN(pubdate);
SELECT pubdate from books WHERE MIN(pubdate) IS NOT NULL;

Question 4. Question : (TCO 7) Given the books table described below, which of the following will display the title and retail price of books that are priced higher than the average retail price of all books?
books: bookid(PK), ISBN, title, pubdate, cost, retail, category, pubid(FK)
SELECT title, retail FROm books WHERE retail IN (SELECT AVG(retail) FROM books);
SELECT title, retail FROM books WHERE retail > (SELECT AVG(retail) FROM books);
SELECT title, retail FROM books WHERE retail > AVG(retail);
SELECT title, AVG(retail) FROM books;

Question 5. Question : (TCO 7) Which of the values listed below can be returned by a subquery referenced as follows?
WHERE vendorid = (subquery)
A single value
A column of one or more rows
A table
A subquery can’t be used in this way.

Question 6. Question : (TCO 7) What type of subquery is executed once for each row processed by the main query?
Correlated
Uncorrelated
Inner
Outer
Question 7. Question : (TCO 7) Given the two tables described below, which of the following queries will display the names of the customers with orders shipped after December 1, 2014?
customer: with the fields customerid(PK), lastname, firstname
order: with the fields orderid(PK), orderdate, shipdate, customerid(FK)
SELECT lastname, firstname FROM customer WHERE customerid = (SELECT customerID FROM order WHERE shipdate > ‘2014-01-12’);
SELECT lastname, firstname FROM customer WHERE customerid = (SELECT customerID FROM order WHERE shipdate < ‘2014-01-12’);
SELECT lastname, firstname FROM customer WHERE customerid = (SELECT customerID FROM order WHERE shipdate > ‘2014-12-01’);
SELECT lastname, firstname FROM customer WHERE customerid = (SELECT customerID FROM order WHERE shipdate < ‘2014-12-01’);


Question 8. Question : (TCO 7) Given the two tables described below, which of the following queries will display each customerid along with the number of orders placed by that customer?
customer: with the fields customerid(PK), lastname, firstname
order: with the fields orderid(PK), orderdate, shipdate, customerid(FK)
SELECT customerid, COUNT(customerid) FROM order;
SELECT customerid, COUNT(ordered) FROM order;
SELECT customerid, COUNT(orderid) FROM order GROUP BY customerid;
SELECT customerid, COUNT(orderid) FROM order GROUP BY orderid;

Question 9. Question : (TCO 7) Given the books table described below, which of the following will display each category along with the average retail price of books in that category?
books: bookid(PK), ISBN, title, pubdate, cost, retail, category, pubid(FK)
SELECT AVG(retail) FROM books;
SELECT category, AVG(retail) FROM books GROUP BY category:
SELECT category, AVG(retail) FROM books HAVING category;
SELECT category, SUM(retail) FROM books GROUP BY category;

Question 10. Question : (TCO 7) The expression below will be TRUE for what values of x?
x > ALL(5, 9)
5 and below
5 to 9
5 and above
9 and above

Devry CIS336 Final Exam answers

Week 8 : Wk8 – Final Exam

Top of Form

Bottom of Form



Multiple Choice
Question 1. 1. (TCO 1) A DBMS performs several important functions that guarantee the integrity and consistency of the data in the database. Which of the following is NOT one of those functions? (Points : 4)
Multiuser access control
Data integrity management
Database access languages
End of month reports

Question 2. 2. (TCO 1) A relational DBMS provides protection of the _____ through security, control, and recovery facilities. (Points : 4)
user
network
system
database

Question 3. 3. (TCO 2) A relationship is an association between _____ (Points : 4)
objects.
entities.
databases.
fields.

Question 4. 4. (TCO 2) A _____ key is a key that is composed of more than one attribute. (Points : 4)
primary
foreign
composite
domain

Question 5. 5. (TCO 3) The PK must uniquely identify each entity instance. A primary key must be able to guarantee unique values. It cannot contain nulls. This rationale belongs to _____ (Points : 4)
unique values.
nonintelligent.
preferably single-attribute.
security complaint.

Question 6. 6. (TCO 3) The extended entity relationship model (EERM) is sometimes referred to as the _____ (Points : 4)
entity relationship model.
enhanced entity relationship model.
entity clustering relationship model.
extended entity relationship doctrine.

Question 7. 7. (TCO 3) A table that has all key attributes defined, has no repeating groups, and all its attributes are dependent on the primary key, is said to be in _____ (Points : 4)
1NF.
2NF.
3NF.
4NF.
BCNF.

Question 8. 8. (TCO 4) When a constraint is created at the _____ level with the CREATE TABLE command, the constraint definition is simply included as part of the column definition. (Points : 4)
table
column
database
row





Top of Form



Top of Form

Bottom of Form


Page 2 – Multiple Choice


Question 1. 1. (TCO 4) When creating a table, which of the following statements is NOT correct? (Points : 4)
The schema of the table must be explicitly stated.
A user can have two tables with the same name, as long as the column names are different.
The column list must be enclosed in parentheses ( ).
Default values cannot be assigned to all columns in a table.

Question 2. 2. (TCO 4) Which of the following SQL statements would you use to create a table named DEVRY? (Points : 4)
CREATE Devry
(
Student_id NUMBER (12),
Student_name VARCHAR2 (15),
Student_city VARCHAR2 (12)
);
CREATE TABLE Devry
(
Student_id NUMBER (12)
Student_name VARCHAR2 (15)
Student_city VARCHAR2 (12)
);
CREATE TABLE Devry
(
Student_id NUMBER (12),
Student_name VARCHAR2 (15),
Student_city VARCHAR2 (12)
);
CREATE TABLE Devry
Student_id NUMBER (12),
Student_name VARCHAR2 (15),
Student_city VARCHAR2 (12);

Question 3. 3. (TCO 5) The Crow’s Foot model is more _____-oriented than the Chen model. (Points : 4)
object
user
implementation
processor

Question 4. 4. (TCO 5) Knowing the _____ number of entity occurrences is very helpful at the application software level. (Points : 4)
maximum
minimum
exact
maximum and minimum

Question 5. 5. (TCO 6) The _____ statement can be used to enable or disable a constraint. (Points : 4)
alter table
modify table
create table
update table

Question 6. 6. (TCO 6) When modifying the data characteristics of a column in Oracle, which of the following is correct? (Points : 4)
The column size can be increased.
The size of the column can be decreased.
Changing the default value of a column will change the values of data already in a table.
If a NUMBER column is empty, its precision and scale cannot be changed.

Question 7. 7. (TCO 6) Which of the following keywords can be used to change the size, datatype, or default value of an existing column? (Points : 4)
ADD
MODIFY
CHANGE
RESET

Question 8. 8. (TCO 7) Any type of subquery can be used in the _____ clause of a SELECT statement. (Points : 4)
WHERE
HAVING
FROM
ORDER BY
GROUP BY




Top of Form


Page 3 – Multiple Choice


Question 1. 1. (TCO 7) Which of the following subqueries returns more than one row of results to the outer query? (Points : 4)
Multiple-column subquery
Single-row subquery
Multiple-row subquery
Correlated subquery

Question 2. 2. (TCO 7) To list a unique value, where the list will produce only a list of those values that are different from one another, you will write the command _____ (Points : 4)
SELECT ONLY V-CODE
FROM PRODUCT;.
SELECT UNIQUE V-CODE
FROM PRODUCT;.
SELECT DIFFERENT V-CODE
FROM PRODUCT;.
SELECT DISTINCT V-CODE
FROM PRODUCT;.

Question 3. 3. (TCO 8) Based upon the contents of the BOOK_ORDER table shown below, which of the following SQL statements will display the ship date for order 1006 as April 2, 2002?
(Points : 4)
SELECT order#, TO_CHAR(shipdate, ‘fmMonth DD, YYYY’)
FROM book_order;
SELECT order#, TO_DATE(shipdate, ‘fmMonth DD, YYYY’)
FROM book_order;
SELECT order#, TO_CHAR(shipdate, ‘Month DD, YYYY’)
FROM book_order;
SELECT order#, TO_DATE(shipdate, ‘Month DD, YYYY’)
FROM book_order;

Question 4. 4. (TCO 8) Which of the following format elements will display insignificant leading zeros? (Points : 4)
$999
0009999
99.999
9,999.990

Question 5. 5. (TCO 8) Which of the following functions determines the number of characters in a character string? (Points : 4)
COUNT
NUMBER
LENGTH
DECODE

Question 6. 6. (TCO 9) The column to be updated by the UPDATE command is specified in the _____ clause. (Points : 4)
UPDATE
SET
WHERE
COL

Question 7. 7. (TCO 9) Using the promotion table shown below, which of the following SQL statements will insert a new row into the PROMOTION table?
(Points : 4)
INSERT INTO promotion (gift, minretail, maxretail)
VALUES (FREE BOOK, 75.01, 89.99);
INSERT INTO promotion (gift, minretail, maxretail)
VALUES (‘FREE BOOK’, 75.01, 89.99);
INSERT INTO promotion VALUES (FREE BOOK, 75.01, 89.99);
INSERT INTO promotion (gift, minretail)
VALUES (FREE BOOK, 75.01, 89.99);

Question 8. 8. (TCO 10) Which of the following commands is used to establish a user account? (Points : 4)
CREATE NEW USER username
IDENTIFIED BY password;
CREATE USERNAME username
IDENTITY password;
CREATE USER username PASSWORD password;
CREATE USER username IDENTIFIED BY password;

Question 9. 9. (TCO 10) Which command will delete a user account from Oracle9i? (Points : 4)
DELETE USER username;
DELETE USER username IDENTIFIED BY password;
DROP USER username IDENTIFIED BY password;
DROP USER username;



Top of Form

Bottom of Form

Page 4 – Essays


Question 1. 1. (TCO 2) Explain what physical independence means. (Points : 15)





Question 2. 2. (TCO 3) What is a composite primary key and in what situation are they most commonly used? Give an example. (Points : 15)




Question 3. 3. (TCO 7) Sally needs to find all employees who have a date of hire between 01-JAN-2003 and 01-JAN-2005. She writes and executes the following query.
SELECT emp_no, emp_lname, date_of_hire
FROM emp
WHERE date_of_hire BETWEEN ’01-JAN-2005′ and ’01-JAN-2003′;
When she looks at the returned result set it is empty. Why? (Points : 15)




Question 4. 4. (TCO 8) In a table named ORDER, there is a column named SHIPDATE that contains a date for each order that has been shipped. Write the query that would show the number of orders that have been shipped. List the column name as Number of Orders Shipped for this derived column. (Points : 15)




Question 5. 5. (TCO 6) Write the SQL statement that will remove the database table EMPLOYEE. (Points : 15)







Question 1. 1. (TCO 7) Write a join query that for every order placed on September 5, 1998, (use ’05-SEP-1998′) will list the order number and order date along with the customer number, last name, and first name of the customer who placed the order.
(Points : 15)





Question 2. 2. (TCO 8) Write a query that will list the part number, part description, and on-hand value (units on hand * unit price) for each part in item class AP. Give the expression an alias of on-hand value.
(Points : 15)




Question 3. 3. (TCO 8) Write a subquery that will list the part number, part description, and units on hand of all parts where the number of units on hand is greater than the average of units on hand for all parts.
(Points : 15)




Question 4. 4. (TCO 7) Using the orders table, write a query that will list the order number, date, and customer number for every order that was made prior to September 5, 1998. Format the date in your result set to be in the same format as above (i.e., September 5, 1998).
(Points : 15)




Question 5. 5. (TCO 7) Using a NATURAL JOIN method, write a query that will list the customer number, last name, and first name for every customer who currently has an order on file for an iron.
(Points : 15)








Top of Form

Bottom of Form
Bottom of Form
Bottom of Form
Bottom of Form
Bottom of Form

By Anne Newton | Nov 22, 2017 | Category > Story > Friends | Comments | Views 15

 
Comments
 

Read More Related Stories