• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 23 pages
Exam (elaborations)

SER322: Fundamentals of Database Systems: Midterm study Exam And All Correct Answers.

Document preview thumbnail
Preview 3 out of 23 pages

Which SQL keyword is used to sort the result-set in descending order using the NAME column? a. SORT BY NAME DESC b. ORDER BY NAME DESC c. ORDER DESC NAME d. ORDER NAME DESC - Answer b. ORDER BY NAME DESC The following keyword selects records that have matching values in both tables. a. LEFT JOIN b. INNER JOIN c. RIGHT JOIN d. SELF JOIN - Answer b. INNER JOIN With SQL, how can you delete the records from "Students" table where the "LastName" is Williams. a. DELETE ROW Students WHERE LastName ='Williams'; b. DELETE FROM Students WHERE LastName ='Williams'; c. DELETE Students WHERE LastName ='Williams'; d. DELETE TABLE Students WHERE LastName = 'Williams'; - Answer b. DELETE FROM Students WHERE LastName ='Williams';

Content preview

SER322: Fundamentals of Database
Systems: Midterm study Exam And All
Correct Answers.
Which SQL keyword is used to sort the result-set in descending order using the NAME column?




a. SORT BY NAME DESC

b. ORDER BY NAME DESC

c. ORDER DESC NAME

d. ORDER NAME DESC - Answer b. ORDER BY NAME DESC



The following keyword selects records that have matching values in both tables.




a. LEFT JOIN

b. INNER JOIN

c. RIGHT JOIN

d. SELF JOIN - Answer b. INNER JOIN



With SQL, how can you delete the records from "Students" table where the "LastName" is Williams.



a. DELETE ROW Students WHERE LastName ='Williams';

b. DELETE FROM Students WHERE LastName ='Williams';

c. DELETE Students WHERE LastName ='Williams';

d. DELETE TABLE Students WHERE LastName = 'Williams'; - Answer b. DELETE FROM Students WHERE
LastName ='Williams';

,How do you change the marks of all students in Students table with marks 65 to 70 with SQL.



a. UPDATE Students SET Marks=65 WHERE Marks = 70;

b. MODIFY Students SET Marks=70 WHERE Marks = 65;

c. UPDATE Students SET Marks=70 WHERE Marks = 65; - Answer c. UPDATE Students SET Marks=70
WHERE Marks = 65;



With SQL, how do you select all the records from a table named "Students" where the "FirstName" is
Jack and "Marks" are greater than 65?




a. SELECT * FROM Students WHERE 'FirstName'='Jack' AND 'Marks'>65;



b. SELECT * FROM Students WHERE 'FirstName'='Jack', 'Marks'>65;



c. SELECT * FROM Students WHERE FirstName='Jack' AND Marks>65; - Answer c. SELECT * FROM
Students WHERE FirstName='Jack' AND Marks>65;



Which SQL keyword is used to group rows with same values.



a. JOIN

b. ORDER BY

c. COMBINE

d. GROUP BY - Answer d. GROUP BY



_____ is an attribute (or a set of attributes) in a database relation that has a unique value.



a. Foreign Key

b. Super Key

c. Secondary Key

, d. Alternate Key - Answer Super Key



_____ constraint dictates that the foreign key must contain values that match the primary key in the
related table, or must contain null.



a. Domain

b. Key

c. Referential Integrity

d. Entity Integrity - Answer Referential Integrity



Consider the following relations for a database that keeps track of business trips of salespersons in a
sales office:



SALESPERSON (SSN, Name, Start_Year, Dept_No)



TRIP (TripID, SSN, From_City, To_City, Departure_Date, Return_Date)



EXPENSE (TripID, Account#, Amount)



Identify the foreign keys for this schema:



a. TripID in EXPENSE relation references TRIP relation; SSN in TRIP relation references SALESPERSON
relation

b. TripID in EXPENSE relation references TRIP relation

c. SSN in SALESPERSON relation

d. Account# in EXPENSE relation - Answer a. TripID in EXPENSE relation references TRIP relation;

SSN in TRIP relation references SALESPERSON relation



Consider the following relations for a database that keeps track of business trips of salespersons in a
sales office:

Document information

Uploaded on
October 13, 2024
Number of pages
23
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$10.79

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
TestSolver9
3.6
(182)
Sold
1036
Followers
131
Items
32667
Last sold
2 days ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions