CS代考 12/7/21, 11:14 PM Final Exam – Spring 2021 (Remotely Proctored)

12/7/21, 11:14 PM Final Exam – Spring 2021 (Remotely Proctored)
Points 100  Not Published 
Details Questions
Show Question Details

Copyright By PowCoder代写 加微信 powcoder

NOTE: Question details not available when more than 25.
 HonorStatement
In accordance with The Ohio State University Code of Student Conduct, by taking this Exam I certify that:
I shall NOT discuss the contents of this exam with anyone who has not already taken this exam.
I should NOT copy the content of this exam
I should NOT shared the content of this exam
I have received NO aid on this exam from any other person
I have NOT given anyone aid on this exam
I took the exam and all the attempts in the same computer and this exam is 100% my own work
By submitting the exam, I pledge on my honor that I have not received or given any unauthorized assistance in this exam.
Please type your name to sign your exam
 Question
Section 1 – True/False (16 points total – 2 points each)
 T/F group Pick 1 questions, 2 pts per question    
https://osu.instructure.com/courses/108805/quizzes/595105/edit

12/7/21, 11:14 PM Final Exam – Spring 2021 (Remotely Proctored)
 Question
The count aggregate function counts duplicated values when counting the number of elements in a column (attribute).
 Question
The count aggregate function counts NULL values when counting the number of elements in a column (attribute).
 T/F group 1 Pick 1 questions, 2 pts per question    
 Question
All valid XML document are also well-formed
 Question
One benefit of XML DTD documents have over XML Schema documents is that you can parse DTD documents with the same parsers that are used to parse XML documents
 T/F group 2 Pick 3 questions, 2 pts per question    
 Question
https://osu.instructure.com/courses/108805/quizzes/595105/edit

12/7/21, 11:14 PM Final Exam – Spring 2021 (Remotely Proctored)
 Question
A relation in 3NF is always in BCNF.
 Question
A relation schema R in BCNF must have at least one functional dependency
 Question
Transitive functional dependency means that there is a FD Z->X that can be broken down into two other dependencies, X->Y and Y->Z
 Question
A prime attribute of a relation R will always be an attribute of a superkey of R
The schema-based constraints include the data dependencies constraints.
 T/F group 3 Pick 1 questions, 2 pts per question    
 Question
https://osu.instructure.com/courses/108805/quizzes/595105/edit

12/7/21, 11:14 PM Final Exam – Spring 2021 (Remotely Proctored)
 Question
Websites administrators concerns about SQL-injection need to be handled by installing and configuring advanced security equipment to protect from hackers.
 T/F group 4 Pick 1 questions, 2 pts per question    
 Question
This schedule is not serializable: r3 (X); r2 (X); r1(X); w3(X); w1(X);
 Question
This schedule is not serializable: r1 (X); r2 (X); r3(X); w1(X); w3(X);
The two problems caused by impedance mismatch, between the database model and programming language model: connectivity and memory leaks, are handled by the Application Programming Interface.
 T/F group 5 Pick 1 questions, 2 pts per question    
https://osu.instructure.com/courses/108805/quizzes/595105/edit

12/7/21, 11:14 PM Final Exam – Spring 2021 (Remotely Proctored)
 Question
To handle concurrency, the developer needs to provide transactions that are atomic, correct, isolated, and durable.
 Question
Tree-based indexes are best for looking up values based on range tests because they keep references to data in sorted order.
 Question
Section 2 – MULTIPLE CHOICE (70 points, 2 points each) – Select the best option (unless indicated)
 SQL basic Pick 3 questions, 2 pts per question    
 Question
Choose the SQL query expression that is equivalent to:
σ (x=a, y=b, z=c) R(x, y, z)
https://osu.instructure.com/courses/108805/quizzes/595105/edit

12/7/21, 11:14 PM Final Exam – Spring 2021 (Remotely Proctored)
 Question
Suppose we have a table constraint in an SQL Create Table statement for Orders, such as Foreign Key Snumb References Supplier (Snumb) On Delete Cascade.
If we execute Delete from Supplier where Snumb = 100, then from the following options
select all that may apply (Do not guess, Carmen takes points off for a wrong answer).
 Question
A relational database schema to keep track of movies and actors is shown below. CASTING links MOVIES and ACTORS (many-to-many relationship).
ACTOR (id, name)
MOVIE (movieId, title, year, director, producer) CASTING (movieId, actorId, order)
Select the appropriate SQL DDL statements to create the ACTOR relation.
 Question
Which of the following can not be included in an SQL CREATE TABLE statement?
Multiple answer question, DO NOT guess, Carmen takes points off for incorrect options.
 Question
https://osu.instructure.com/courses/108805/quizzes/595105/edit

12/7/21, 11:14 PM Final Exam – Spring 2021 (Remotely Proctored)
Suppose we have a table constraint, in an SQL Create Table statement for Purchases, such as Foreign Key Pname References Cart (Pnumb) On Update Cascade On Delete Cascade.
If we execute Update from Cart where Pnumb = 100, then from the following options
select all that may apply (Do not guess, Carmen takes points off for a wrong answer)
 Multiple – Ex Sp2020 Pick 20 questions, 2 pts per question    
 Question
Which of the following is a definition of a database management system?












Given the DTD above, which of the following statements is true:
 Question
https://osu.instructure.com/courses/108805/quizzes/595105/edit

12/7/21, 11:14 PM Final Exam – Spring 2021 (Remotely Proctored)
 Question
Physical data independence can be defined as
 Question
Assume we want to map a 1:N relationship type, which involves entity types R and S, where R is on the N side of the relationship type and S is on the 1 side, to the relational model. The attributes of the relationship type should be mapped to attributes of
 Question
Which is not a responsibility of the database administrator?
 Question
A weak entity type
Which schema level hides the details of physical storage structures and concentrates on describing entities, relationships and constraints of the whole database?
 Question
A multi-valued attribute A, of an entity type E, should be mapped to the relational model by
https://osu.instructure.com/courses/108805/quizzes/595105/edit

12/7/21, 11:14 PM Final Exam – Spring 2021 (Remotely Proctored)
 Question
What would be the equivalent SQL statement for the following Relational Algebra query:
 Question
Assume we want to map a relationship type, which involves entity types R and S to the relational model. Entity type R has a key called Rkey and entity type S has a key called Skey. Suppose R has a structural constraint of (1,1) for the relationship type and S has a structural constraint of (0,1) for the relationship type. The relationship type should be mapped to the relational model by
 Question
If a set of attributes K, in relation schema R1 is a foreign key for R1, then
https://osu.instructure.com/courses/108805/quizzes/595105/edit

12/7/21, 11:14 PM Final Exam – Spring 2021 (Remotely Proctored)
 Question
When we refer to a relation as an n-degree relation, the “n” refers to ..
 Question
The external schema level describes
 Question
What is the purpose of interleaving operations?.
 Question
In terms of completeness constraints in an Enhanced relationship model, a partial specialization means:
 Question
Given the two relations R(A,B,C) and S(A,B,C), which of the following is always true
 Question
https://osu.instructure.com/courses/108805/quizzes/595105/edit

12/7/21, 11:14 PM Final Exam – Spring 2021 (Remotely Proctored)
 Question
Analyze the relation schema R and select the options that apply:
 Question
The functional dependency A -> B for relation schema R(A,B,C,D) implies that
Desirable properties of relational normalization include
 Question
Given the following two tables, R and S, the result of the difference operator, R – S is RS
a1 | b1 | c1 b1 | c1
https://osu.instructure.com/courses/108805/quizzes/595105/edit

12/7/21, 11:14 PM Final Exam – Spring 2021 (Remotely Proctored)
 Question
If AB -> CD is one of the functional dependencies, which hold for relation schema R(A,B,C,D), then
 Question
If a relation R is decomposed into {R1, R2, …, Rn} and the decomposition is lossless then
 Question
Given only the relation scheme Books(Title,Author,Year,Publisher), we can infer the following functional dependency
a1 | b2 | c2 b2 | c2 a2 | b1 | c1 b3 | c3 a2 | b2 | c2
a2 | b3 | c3
a3 | b3 | c3
 Question
If the following functional dependencies, (W ->X, X -> Y) hold for a database schema R(W, X, Y), then the join of R1(W, X) and R2(X, Y) will be
https://osu.instructure.com/courses/108805/quizzes/595105/edit

12/7/21, 11:14 PM Final Exam – Spring 2021 (Remotely Proctored)
 Question
Given the following two tables, R and S, RS
a1 | b1 | c1 a1 | b2 | c2 a2 | b1 | c1 a2 | b3 | c2 a2 | b3 | c3 a4 | b3 | c3
b1 | c1 b2 | c2 b4 | c3
the result of the SQL query: Select A From R Where B = ANY (Select B From S) will be
 Question
Which of the following is a correct statement with respect to relations and keys?
 Question
How does the formal relational model differ from tables in SQL?
 Question
For the relation Supplies(Snumber,Pnumber,Qty), which of the following SQL statements is equivalent to the relational algebra π operator on Snumber?
https://osu.instructure.com/courses/108805/quizzes/595105/edit

12/7/21, 11:14 PM Final Exam – Spring 2021 (Remotely Proctored)
 Question
In EER to relational mapping, you create a single relation with super-class attributes and specific attributes of all sub-classes, plus type attribute(s) to indicate membership in each subclass for …
 Question
What can we say about the ER Model below?
 Multiple – Ex Sp2020 – 2 Pick 1 questions, 3 pts per question    
 Question
Analyze the potential vulnerability created by the following java code cases and select the option that better controls the risks.
 Question
A schedule Sa is serializable if
https://osu.instructure.com/courses/108805/quizzes/595105/edit

12/7/21, 11:14 PM Final Exam – Spring 2021 (Remotely Proctored)
 UpdateSal
The Java program BANK.java contains the following function:
public static void updateSalary(Statement stat, int ssn, int newValue) th
rows Exception {
ResultSet rs = stat.executeQuery(“select * from employee WHERE ssn=”+s
rs.next();
int val = rs.getInt(“salary”);
val = newValue;
Upon running updateSalary(stat, 19, 100000) where 19 is the SSN for existing employee , who used to have a salary of 200,000.
What would ’s salary in the database after this function call?
 Multiple – Ex Sp2020 – 4 Pick 1 questions, 2 pts per question    
 Question
What is the correct SQL syntax for inserting a new row in the “Persons” table?
 Question
What is the correct SQL syntax for selecting all the columns where the “LastName” is alphabetically between (and including) “Hansen” and “Pettersen” ?
 Multiple – Ex Sp2020 – 3 Pick 1 questions, 3 pts per question    
https://osu.instructure.com/courses/108805/quizzes/595105/edit

12/7/21, 11:14 PM Final Exam – Spring 2021 (Remotely Proctored)
 SQLpuzzleDesc
Section 3 – Fill in the blanks and match For the following database schema:
We have the following set of SQL clauses (each one identified by a letter or character). You are going to use these clauses in the next questions.
A. SELECT Major, count(*) FROM Student, Section
B. SELECT Name, Id, Major FROM Student
C. SELECT Major FROM Student
D. SELECT Major, count(*) FROM Student
E. SELECT *
F. SELECT * FROM Enroll
G. FROM Student
H. FROM Student, Enroll
I. WHERE StudentId IN
J. WHERE Mayor IN
K. WHERE Id < 200 L. GROUP BY Major, Name M. GROUP BY Student N. GROUP BY Major W. ORDER BY Major, Name X. ORDER BY Major Y. HAVING count(*) < 200 Z. HAVING count(*) > 200(. (
 Question
Section 3 – SHORT ANSWERS (16 points)
https://osu.instructure.com/courses/108805/quizzes/595105/edit

12/7/21, 11:14 PM Final Exam – Spring 2021 (Remotely Proctored)
https://osu.in
 Question
Write a query in SQL that retrieves a list of majors and number of students on each one that have fewer than 200 students with that major. For full credit, you must use a HAVING clause.
Instructions: use only the the numbering character from the SQL clause list given. The ; at the End of the statement is provided. Leave a blank space between characters.
A. SELECT Major, count(*) FROM Student, Section
B. SELECT Name, Id, Major FROM Student
C. SELECT Major FROM Student
D. SELECT Major, count(*) FROM Student
E. SELECT *
F. SELECT * FROM Enroll
G. FROM Student
H. FROM Student, Enroll
I. WHERE StudentId IN
J. WHERE Major IN
K. WHERE Id < 200 L. GROUP BY Major, Name M. GROUP BY Student N. GROUP BY Major W. ORDER BY Major, Name X. ORDER BY Major Y. HAVING count(*) < 200 Z. HAVING count(*) > 200(. (
Example: write a query that selects all attributes/tuples for all the students:
The response will be:E G
Response: [c1];
 Question
Write a nested query in SQL that retrieves a list of student names, id numbers and majors who have a major that has fewer than 200 students with that major. Order your list alphabetically, first by major then by student name.
Instructions: use only the the numbering character from the SQL clause list given. The ; at the End of the statement is provided. Leave a blank space between characters.
Note: use “(” and “)” for placing inner queries.
A. SELECT Major, count(*) FROM Student, Section
B. SELECT Name, Id, Major FROM Student
C. SELECT Major FROM Student
D. SELECT Major, count(*) FROM Student
E. SELECT *
structure.com/courses/108805/quizzes/595105/edit

12/7/21, 11:14 PM Final Exam – Spring 2021 (Remotely Proctored)
https://osu.instructure.com/courses/108805/quizzes/595105/edit
Example: write a query that selects all attributes/tuples for all the students:
The response will be:E G
Response: [c2];
F. SELECT * FROM Enroll
G. FROM Student
H. FROM Student, Enroll
I. WHERE StudentId IN
J. WHERE Mayor IN
K. WHERE Id < 200 L. GROUP BY Major, Name M. GROUP BY Student N. GROUP BY Major W. ORDER BY Major, Name X. ORDER BY Major Y. HAVING count(*) < 200 Z. HAVING count(*) > 200(. (
 ER High Pick 1 questions, 8 pts per question    
 Question
The following diagram depicts a complete relational schema for a Pet service company and the corresponding Relational database schema.

12/7/21, 11:14 PM Final Exam – Spring 2021 (Remotely Proctored)
 Question
Have a nice Summer !!
  Group  Find Questions
Customer (phone, name)
Pet (phone, name)
Service (type, price)
Appointment (phone, name, type, date, time)
Match the statement on the right from the drop-down that best fit the SQL DDL clause on the left.
https://osu.instructure.com/courses/108805/quizzes/595105/edit

12/7/21, 11:14 PM Final Exam – Spring 2021 (Remotely Proctored)
Notify users this quiz has changed
Save & Publish
https://osu.instructure.com/courses/108805/quizzes/595105/edit

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com