Uploaded by Bekzhan Koshkinov

pdf

advertisement
12/15/2015
Review Test Submission: Quiz 2 – MET CS 669 Database ...
Rishabh Grover
Online Campus Dashboard
H
Assessments
My Blackboard Learn Courses
All Blackboard Learn Courses
Student Services
ePortfolio
Review Test Submission: Quiz 2
Review Test Submission: Quiz 2
User
Rishabh Grover
Course
MET CS 669 Database Design and Implementation for Business (Fall 2015) On Campus
Test
Quiz 2
Started
10/7/15 12:24 AM
Submitted
10/7/15 1:00 AM
Due Date
12/16/15 6:00 PM
Status
Completed
Attempt
Score
94.99995 out of 100 points
Time
Elapsed
35 minutes out of 1 hour and 30 minutes
Instructions Handling Technical Difficulties: If you experience technical difficulties while taking this quiz, the quickest and easiest
resolution is to immediately logout, then login using a different browser, then resume taking the quiz in the new browser.
Logging out or logging in does not cancel or submit the in‑progress quiz, and the answers you have already saved will
remain saved. Simply reopen the quiz in the new browser and click the "Continue Assessment" button to resume taking the
quiz. Though many technical difficulties can be resolved using this method, in the event you experience the same issues in
the new browser, please complete the quiz as best as you can, then immediately contact technical support at (888)243‑
4596 and email your facilitator.
Results
Displayed
All Answers, Submitted Answers, Correct Answers, Feedback, Incorrectly Answered Questions
Question 1
5 out of 5 points
Examine the following entity relationship diagram, then select all statements that correctly describe the diagram.
The DRUM entity has a composite primary key.
b.
A DRUM is associated with at most one DRUMMER.
c.
Both DRUM and DRUMMER are strong entities.
d.
A DRUMMER is associated with zero or more DRUMs.
e.
Answers:
The identity of every DRUM instance depends on an associated DRUMMER instance.
a.
The DRUM entity has a composite primary key.
b.
A DRUM is associated with at most one DRUMMER.
c.
Both DRUM and DRUMMER are strong entities.
d.
A DRUMMER is associated with zero or more DRUMs.
e.
https://onlinecampus.bu.edu/webapps/assessment/review/review.jsp?attempt_id=_4886883_1&course_id=_26890_1&content_id=_3470411_1&outcome_id=_4997…
1/12
12/15/2015
Review Test Submission: Quiz 2 – MET CS 669 Database ...
Question 2
5 out of 5 points
You are given the following basic Crow's foot entity relationship diagram.
Select the business rule that corresponds to this diagram.
Selected Answer:
Answers:
e.
a.
b.
c.
d.
Each computer may be attached to zero to many devices; each device is attached to one computer.
Each computer is attached to one or more devices; each device is attached to one computer.
None of the other answers are correct.
Each computer is attached to one device; each device is attached to one or more computers.
Each device may be attached to many computers; each computer is attached to one device.
e.
Each computer may be attached to zero to many devices; each device is attached to one computer.
Question 3
5 out of 5 points
Match each word with its definition.
Question
Correct Match
Selected Match
Entity
E. An object of interest to the end user
E. An object of interest to the end user
Attribute
D. A characteristic of an entity
D. A characteristic of an entity
Domain
B. Set of possible values for a given attribute
B. Set of possible values for a given attribute
Simple
Attribute
F. An attribute that cannot be further subdivided
F. An attribute that cannot be further subdivided
Composite
Attribute
C.
An attribute which can be further subdivided to yield
additional attributes
Single‑Valued
Attribute
C.
An attribute which can be further subdivided to yield
additional attributes
A. An attribute that can only have a single value
A. An attribute that can only have a single value
All Answer Choices
A. An attribute that can only have a single value
B. Set of possible values for a given attribute
C. An attribute which can be further subdivided to yield additional attributes
D. A characteristic of an entity
E. An object of interest to the end user
F. An attribute that cannot be further subdivided
Question 4
4.99995 out of 5 points
Which of the following are characteristics of a relational database table? (Choose all that apply.)
Selected Answers:
Each column in a relational database table has a name.
a.
A table is perceived as a two‑dimensional structure composed of rows and columns.
c.
All values in a column must be of the same data type.
d.
Answers:
Each column in a relational database table has a name.
a.
https://onlinecampus.bu.edu/webapps/assessment/review/review.jsp?attempt_id=_4886883_1&course_id=_26890_1&content_id=_3470411_1&outcome_id=_4997…
2/12
12/15/2015
Review Test Submission: Quiz 2 – MET CS 669 Database ...
The order the rows are stored is vital to users of the DBMS.
b.
A table is perceived as a two‑dimensional structure composed of rows and columns.
c.
All values in a column must be of the same data type.
d.
Each table in a relational database must have a foreign key.
e.
Question 5
5 out of 5 points
Which of the following business rules should be implemented or enforced in the structure of a database?
Selected Answers:
a.
b.
Answers:
a.
b.
Each customer has exactly one account.
Each invoice is for one account.
Each customer has exactly one account.
Each invoice is for one account.
When customer accounts are more than 27 days overdue they are charged a 2.6% late payment fee.
c.
d.
Today's interest rate on accounts is 2.17%.
Question 6
0 out of 5 points
Study the following relational schema and associated constraints and business rules, and follow the subsequent instructions.
Customer_id is the primary key of Customer. Membership.membership_id is the primary key of Membership. There is a foreign
key constraint from Customer.membership_id to Membership.membership_id.
Each Customer has one Membership.
More than one Customer may have the same Membership.
Each Membership has a unique price and title.
Select all fields that cause this schema to exhibit uncontrolled redundancy.
Customer.name
f.
Answers:
Memberhip.membership_id
a.
Customer.customer_ID
b.
Customer.membership_title
c.
Customer.membership_id
d.
Membership.membership_price
e.
Customer.name
f.
Question 7
5 out of 5 points
Review the diagram below, then select all statements that correctly describe the diagram.
https://onlinecampus.bu.edu/webapps/assessment/review/review.jsp?attempt_id=_4886883_1&course_id=_26890_1&content_id=_3470411_1&outcome_id=_4997…
3/12
12/15/2015
Review Test Submission: Quiz 2 – MET CS 669 Database ...
CUS_LNAME is an attribute of CUSTOMER
b.
The INVOICE table has only one foreign key.
c.
Answers:
The CUSTOMER table has many foreign keys.
a.
CUS_LNAME is an attribute of CUSTOMER
b.
The INVOICE table has only one foreign key.
c.
The CUSTOMER table has only one foreign key.
d.
Question 8
5 out of 5 points
Assume that a database design contains entities named PHOTOGRAPHER, CAMERA, and LOCATION, and that the purpose of these
entities can be inferred from their name. You are asked to implement a relationship between these entities, which conceptually
represents the convergence of PHOTOGRAPHER, CAMERA, and LOCATION to represent a picture. The requirements of this
relationship are listed below. Read the requirements below, then choose all correct implementations of the relationship.
A Picture is taken by a Photographer.
A Photographer takes many Pictures.
A Picture is taken in a specific Location.
Many Pictures may be taken in a Location, by many Photographers and Cameras.
A Picture is taken by a specific Camera.
A Camera may be used to take multiple Pictures.
Choose all correct implementations of this relationship.
d.
Add a fourth entity named PICTURE, and add three foreign keys to this PICTURE entity, each of which respectively
reference the primary keys in Photographer, Camera, and Location.
Answers:
Add a foreign key to Photographer, Camera, and Location, each of which references the primary key in Picture.
a.
b.
Add two foreign keys to Photographer which respectively reference the primary keys in Camera and Location. Add two
foreign keys to Camera which respectively reference the primary keys in Photographer and Location. Add two foreign
keys to Location which respectively reference the primary keys in Photographer and Camera.
Add three foreign keys to each entity which respectively reference the other three entities.
c.
d.
Add a fourth entity named PICTURE, and add three foreign keys to this PICTURE entity, each of which respectively
reference the primary keys in Photographer, Camera, and Location.
Question 9
5 out of 5 points
You are given the following PLANT table:
https://onlinecampus.bu.edu/webapps/assessment/review/review.jsp?attempt_id=_4886883_1&course_id=_26890_1&content_id=_3470411_1&outcome_id=_4997…
4/12
12/15/2015
Review Test Submission: Quiz 2 – MET CS 669 Database ...
Note that PLANT_ID is the primary key in this table. Choose the entity relationship diagram in Crow's foot notation which correctly
represents this table.
Selected Answer:
b.
Answers:
a.
b.
c. None of the other answers are correct.
d.
e.
Question 10
5 out of 5 points
Read the business rules below which pertain to entities termed DISK and COMPUTER, then follow the subsequent instructions.
Neither DISK nor COMPUTER is a weak entity
COMPUTER is not optional to DISK, and DISK is not optional to COMPUTER
Select the correct entity relationship diagram which matches the requirements for the DISK and COMPUTER entities. Choose all
designs that correctly implement the business rules.
Selected Answers:
a.
Answers:
https://onlinecampus.bu.edu/webapps/assessment/review/review.jsp?attempt_id=_4886883_1&course_id=_26890_1&content_id=_3470411_1&outcome_id=_4997…
5/12
12/15/2015
Review Test Submission: Quiz 2 – MET CS 669 Database ...
a.
b.
c.
d.
Question 11
5 out of 5 points
Match the crow's foot notation symbols with their meaning.
Question Correct Match
Selected Match
B. From one to many
C.
Either zero or one
Exactly one
D.
A.
From zero to many
B. From one to many
C.
D.
A.
Either zero or one
Exactly one
From zero to many
All Answer Choices
A.
From zero to many
B. From one to many
C.
D.
Either zero or one
Exactly one
Question 12
5 out of 5 points
Which of the following should be a derived attribute? (Check all that would be best derived rather than stored.)
Selected Answers:
a.
c.
Answers:
Number of days that an employee has worked for an organization.
Person's age
Number of days that an employee has worked for an organization.
a.
Person's social security number
b.
Person's age
c.
Person's last name
d.
Person's eye color
e.
https://onlinecampus.bu.edu/webapps/assessment/review/review.jsp?attempt_id=_4886883_1&course_id=_26890_1&content_id=_3470411_1&outcome_id=_4997…
6/12
12/15/2015
Review Test Submission: Quiz 2 – MET CS 669 Database ...
Question 13
5 out of 5 points
A student was asked to create an ER diagram given the following business rules:
A plant may grow no leaves, and a plant may grow many leaves.
A leaf must grow on one plant.
The student created the following solution:
Identify all problems with this solution.
Selected Answers:
a. The symbol adjacent to the LEAF table should be the
d. The
Answers:
a.
b.
c.
The symbol adjacent to the LEAF table should be the
The
The
symbol.
adjacent to the LEAF table should be the symbol.
The symbol adjacent to the PLANT table should be the
d.
symbol.
symbol adjacent to the PLANT table should be the symbol.
symbol.
symbol adjacent to the PLANT table should be the symbol.
Question 14
5 out of 5 points
A student was asked to perform the PRODUCT relational set operation on the following two tables:
The student created the following solution:
Select all statements that correctly describe this solution.
Some of the rows in the student’s solution are also in the correct solution.
d.
The solution contains the correct number of rows.
e.
Answers:
The solution contains all of the rows which would result from the PRODUCT operation.
a.
The rows in the student’s solution are all rows in the correct solution.
b.
The solution does not exist because there are no common columns between the two tables.
c.
Some of the rows in the student’s solution are also in the correct solution.
d.
The solution contains the correct number of rows.
e.
The correct solution has a different column structure.
f.
https://onlinecampus.bu.edu/webapps/assessment/review/review.jsp?attempt_id=_4886883_1&course_id=_26890_1&content_id=_3470411_1&outcome_id=_4997…
7/12
12/15/2015
Review Test Submission: Quiz 2 – MET CS 669 Database ...
Question 15
5 out of 5 points
You are given the following FRUIT table:
You are also given an incomplete graphical representation of an index on the FAMILY_ID column:
Note that the number(s) are missing from the cell in the second column and first row. Select all missing number(s) to correctly
complete this diagram.
Selected Answers:
4
a.
1
e.
Answers:
4
a.
104
b.
2
c.
101
d.
1
e.
Question 16
5 out of 5 points
A bookstore has in its database two tables created with the following SQL:
CREATE TABLE book (
book_id DECIMAL PRIMARY KEY,
https://onlinecampus.bu.edu/webapps/assessment/review/review.jsp?attempt_id=_4886883_1&course_id=_26890_1&content_id=_3470411_1&outcome_id=_4997…
8/12
12/15/2015
Review Test Submission: Quiz 2 – MET CS 669 Database ...
book_title VARCHAR(1024) NOT NULL,
subject_id DECIMAL NULL,
FOREIGN KEY (subject_id) REFERENCES subject
);
CREATE TABLE subject (
subject_id DECIMAL PRIMARY KEY,
subject_title VARCHAR(1024) NOT NULL
);
The bookstore requests a list of all subject titles, and the subject's associated book titles if the subject has any. Books that have
no associated subject should not be listed, and only the subject and book titles should be listed. Select all queries that correctly
obtain the requested information in full.
Selected Answers:
Answers:
SELECT book_title, subject_title
FROM subject LEFT OUTER JOIN book
a. ON book.subject_id = subject.subject_id
SELECT book_title, subject_title
FROM book RIGHT OUTER JOIN subject
b. ON book.subject_id = subject.subject_id
SELECT book_title, subject_title
FROM subject LEFT OUTER JOIN book
a. ON book.subject_id = subject.subject_id
SELECT book_title, subject_title
FROM book RIGHT OUTER JOIN subject
b. ON book.subject_id = subject.subject_id
SELECT book_title, subject_title
FROM book LEFT OUTER JOIN subject
c. ON book.subject_id = subject.subject_id
SELECT book_title, subject_title
FROM book JOIN subject
d. ON book.subject_id = subject.subject_id
Question 17
5 out of 5 points
View the sequence of SQL commands, and follow the instructions below. Assume the syntax of the SQL commands is correct.
CREATE TABLE plant (
plant_num DECIMAL PRIMARY KEY,
plant_species VARCHAR(255) NULL,
plant_common_name VARCHAR(255) NULL
);
INSERT INTO plant VALUES (1, 'Ficus Benjamina', 'Weeping Fig');
INSERT INTO plant VALUES (2, 'Ficus Benjamina', 'Benjamins Fig');
INSERT INTO plant VALUES (3, 'Chamaedorea Seifritzii', 'Bamboo Palm');
Select all answers that correctly describe what wwill occur as a result of executing the two following SQL commands.
SQL Command1
UPDATE plant
SET plant_common_name = 'Ficus'
WHERE plant_species = 'Ficus Benjamina';
https://onlinecampus.bu.edu/webapps/assessment/review/review.jsp?attempt_id=_4886883_1&course_id=_26890_1&content_id=_3470411_1&outcome_id=_4997…
9/12
12/15/2015
Review Test Submission: Quiz 2 – MET CS 669 Database ...
SQL Command2
UPDATE plant
SET plant_common_name = NULL
WHERE plant_species = 'Chamaedorea Seifritzii';
Selected Answers:
SQL Command1 will update two rows.
a.
Both commands will succeed
d.
Answers:
SQL Command1 will update two rows.
a.
Command1 will fail but Command2 will succeed
b.
Command1 will succeed but Command2 will fail
c.
Both commands will succeed
d.
Both Commands will fail
e.
Answer Feedback: Because this is true for the first command, but false for the second command, this answer has been zeroed.
Answer Feedback:
Response Feedback:
Question 18
5 out of 5 points
Which of the following represent reasonable uses of the UNIQUE constraint? (Check all that are reasonable uses of UNIQUE.)
Selected
a.
Answers: Placing a UNIQUE constraint on the VIN (vehicle identification number, which is unique to each vehicle) column of a
VEHICLE table to help detect and prevent the insertion of duplicate records for the same vehicle.
d.
Placing a UNIQUE constraint on a social security number in an EMPLOYEE table to prevent the insertion of two
EMPLOYEEs with the same social security number, and to help prevent duplicate employee entries.
Answers:
a.
Placing a UNIQUE constraint on the VIN (vehicle identification number, which is unique to each vehicle) column of a
VEHICLE table to help detect and prevent the insertion of duplicate records for the same vehicle.
b.
Placing a UNIQUE constraint on {first_name, last_name} in an EMPLOYEE table to prevent two employees with the same
first and last name from being inserted into the table.
Placing a UNIQUE constraint on the postal_code column of an ADDRESS table to help prevent duplicate addresses.
c.
d.
Placing a UNIQUE constraint on a social security number in an EMPLOYEE table to prevent the insertion of two
EMPLOYEEs with the same social security number, and to help prevent duplicate employee entries.
Answer
Feedback:
Answer
Feedback:
Response Feedback:
Question 19
5 out of 5 points
Suppose that the columns of a primary key from TABLE_A are also defined in TABLE_B. Further suppose that a foreign key
constraint is defined on those columns in TABLE_B. Remember that, by definition, this foreign key constraint requires that data
values in those columns in TABLE_B must also be present in TABLE_A. Which of the following can cause a violation of this foreign
key constraint? (Check all SQL operations that can cause a violation of this foreign key constraint.)
b.
An UPDATE of TABLE_A.
https://onlinecampus.bu.edu/webapps/assessment/review/review.jsp?attempt_id=_4886883_1&course_id=_26890_1&content_id=_3470411_1&outcome_id=_499…
10/12
12/15/2015
Review Test Submission: Quiz 2 – MET CS 669 Database ...
c.
d.
f.
Answers:
An UPDATE of TABLE_B.
A DELETE from TABLE_A.
An INSERT into TABLE_B.
An INSERT into TABLE_A.
a.
An UPDATE of TABLE_A.
b.
An UPDATE of TABLE_B.
c.
A DELETE from TABLE_A.
d.
A DELETE from TABLE_B.
e.
An INSERT into TABLE_B.
f.
Question 20
5 out of 5 points
You are given the following tables:
Note that PHONE_ID in the PLAN table is the same as PHONE_ID in the PHONE table; PLAN.PHONE_ID is a foreign key to the PHONE
table.
Below are four possible results of join operations between these tables. View these possible results, then select all true statements
about them.
A.
B.
C.
D.
Result C is the Cartesian product of the two tables.
b.
Result D is the natural join of the two tables.
c.
https://onlinecampus.bu.edu/webapps/assessment/review/review.jsp?attempt_id=_4886883_1&course_id=_26890_1&content_id=_3470411_1&outcome_id=_499…
11/12
12/15/2015
Review Test Submission: Quiz 2 – MET CS 669 Database ...
Answers:
Result B is the Cartesian product of the two tables.
a.
Result C is the Cartesian product of the two tables.
b.
Result D is the natural join of the two tables.
c.
d. Result A is the natural join of the two tables.
Question 21
0 out of 0 points
This area is for you to comment on any of the questions. Because the quiz questions are presented to you in random order, please
include your question number and also cut & paste the question into this section, and then describe any issues you have with the
question. Be specific, especially if your issue may be a cause for a grading adjustment.
Selected Answer:
[None Given]
Correct Answer:
[None]
Response Feedback: [None Given]
Tuesday, December 15, 2015 6:28:24 PM EST
← OK
https://onlinecampus.bu.edu/webapps/assessment/review/review.jsp?attempt_id=_4886883_1&course_id=_26890_1&content_id=_3470411_1&outcome_id=_499…
12/12
Download