Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 3 out of 23 pages
Exam (elaborations)

Data Management-Applications TEST QUESTIONS EXAM ACCURATE AND VERIFIED ACTUAL EXAM QUESTIONS WITH DETAILED ANSWERS FOR GUARANTEED PASS | ALREADY GRADED A

Document preview thumbnail
Preview 3 out of 23 pages

1. When a product is deleted from the product table, all corresponding rows for the product in the pricing table are deleted automatically as well. What is this referential integrity technique called? A. Restrict delete B. Set-to-null C. Cascaded delete D. Soft delete Correct Answer: C. Cascaded delete Rationale: Cascaded delete ensures that when a row in the parent table is deleted, corresponding rows in the child table are automatically deleted. 2. What does the clause PRIMARY KEY followed by a field name in parentheses mean in a CREATE TABLE statement? A. The table will be indexed B. The column is a unique constraint C. The column is a foreign key D. The column is the primary key for the table Correct Answer: D. The column is the primary key for the table Rationale: The PRIMARY KEY clause specifies that the listed column uniquely identifies each row in the table. 3. Which ALTER TABLE statement adds a foreign key constraint to a child table? A. ALTER TABLE child ADD CONSTRAINT fk FOREIGN KEY (par_id); B. ALTER TABLE parent ADD FOREIGN KEY (par_id); C. ALTER TABLE child ADD FOREIGN KEY (par_id) REFERENCES parent (par_id) ON DELETE CASCADE; D. ALTER TABLE parent ADD COLUMN par_id FOREIGN KEY; Correct Answer: C. Rationale: This statement adds a foreign key with a cascading delete rule to maintain referential integrity. 4. How does Table 2 affect the returned results from Table 1 in a LEFT JOIN? A. Only matching rows from Table 1 are returned B. All rows from Table 2 are returned C. All rows from Table 1 are returned regardless of matches D. Only non-matching rows are returned Correct Answer: C. Rationale: LEFT JOIN returns all rows from the left (first) table, even if there's no match in the right table. 5. Which command functions as a RIGHT JOIN with the roles of the tables reversed? A. Cross join B. Inner join C. Left join D. Full join Correct Answer: C. Left join Rationale: LEFT JOIN with reversed table positions yields the same result as a RIGHT JOIN. 6. What does the LEFT JOIN statement do in: SELECT t1., t2. FROM t1 LEFT JOIN t2 ON t1.i1 = t2.i2? A. Selects all rows from both tables B. Selects only rows with matches in both tables C. Selects all rows in Table 1 and matching rows in Table 2 D. Selects all rows in Table 2 and matching rows in Table 1 Correct Answer: C. Rationale: LEFT JOIN includes all rows from the left table and matches from the right table. 7. What is the difference between COUNT(*) and COUNT(col_name)? A. No difference B. COUNT() counts all rows; COUNT(col_name) counts non-null values only C. COUNT() counts distinct values only D. COUNT(col_name) counts all rows Correct Answer: B. Rationale: COUNT(*) includes nulls, whereas COUNT(column) excludes them. 8. How does a row subquery differ from a table subquery? A. Row subquery returns multiple rows B. Table subquery returns scalar values C. Row subquery returns a single row with one or more columns D. Table subquery returns a single value Correct Answer: C. Rationale: A row subquery returns exactly one row with one or more columns. 9. What is a unary relationship? A. Relationship between two different tables B. Relationship with composite keys C. Relationship between instances of a single entity type D. Relationship in a recursive join Correct Answer: C. Rationale: A unary relationship links rows within the same table/entity. 10. Which delete rule sets column values in a child table to a missing value when the matching data is deleted from the parent table? A. Cascade B. Restrict C. Set-to-default D. Set-to-null Correct Answer: D. Rationale: Set-to-null nullifies the foreign key in the child table when the parent is deleted. 11. In which normal form is data that has a simple primary key and no repeating groups? A. First B. Second C. Third D. Boyce-Codd Correct Answer: B. Rationale: Second normal form requires a primary key and the elimination of repeating groups. 12. What does WHERE identify in a basic SQL SELECT statement? A. Columns to display B. Tables to use C. Sorting order D. Rows to be included Correct Answer: D. Rationale: The WHERE clause filters which rows will be returned by the query. 13. Which line returns employee numbers of at least 1000? A. WHERE EMPNUM 1000 B. WHERE EMPNUM = 1000 C. WHERE EMPNUM = 1000 D. WHERE EMPNUM 1000 Correct Answer: C. Rationale: = includes values equal to or greater than 1000. 14. What else does a manager need to create a view besides CREATE VIEW privilege and column-level privilege? A. CREATE TABLE privilege B. ALTER privilege C. SELECT privilege for all columns in the view D. DROP privilege Correct Answer: C. Rationale: SELECT privilege is required for every column used in the view. 15. What happens after executing: DROP VIEW EMPLOYEE;? A. The EMPLOYEE table is deleted B. The base table is truncated C. The EMPLOYEE view is discarded D. Nothing happens Correct Answer: C. Rationale: The DROP VIEW statement removes the view, not the underlying table. 16. What is the name of the internal database where the query optimizer finds information? A. Data warehouse B. Index schema C. Relational catalog D. Performance view Correct Answer: C. Rationale: The relational catalog holds metadata used by the query optimizer. 17. Which command creates a database only if it does not already exist? A. CREATE DATABASE B. CREATE IF NOT EXISTS C. CREATE DATABASE IF NOT EXISTS db_name D. INIT DATABASE Correct Answer: C. Rationale: The IF NOT EXISTS clause prevents error if the database already exists. 18. Which clause groups products in the SQL query: SELECT PRODNUM, SUM(QUANTITY) FROM SALESPERSON ...? A. GROUP BY PRODNUM B. ORDER BY PRODNUM C. SUM(PRODNUM) D. WHERE PRODNUM Correct Answer: A. Rationale: GROUP BY is used with aggregate functions to group rows by PRODNUM. 19. Which DDL statement alters existing database objects? A. SELECT B. INSERT C. ALTER D. GRANT Correct Answer: C. Rationale: ALTER modifies database structures like tables or constraints. 20. Which two SQL data types can represent images or sounds? A. Varchar and Char B. Int and Float C. Binary and Tinyblob D. XML and JSON Correct Answer: C. Rationale: Binary and blob types store unstructured binary data like images and audio. 21. In a relational model, what ensures data relationships and integrity? A. Tables B. Triggers C. Keys D. Columns Correct Answer: C. Rationale: Keys enforce entity integrity and relationships between tables. 22. What is a candidate key? A. A key not yet in use B. A unique identifier among minimal superkeys C. A secondary key D. A nullable key Correct Answer: B. Rationale: Candidate keys are minimal sets of attributes that uniquely identify a row. 23. What is a secondary key used for? A. Creating relationships B. Deleting rows C. Data retrieval purposes only D. Ensuring null values Correct Answer: C. Rationale: Secondary keys help retrieve data but are not used to enforce uniqueness. 24. Which logic framework supports true/false assertions? A. Binary logic B. Predicate logic C. Boolean logic D. Arithmetic logic Correct Answer: B. Rationale: Predicate logic is foundational in databases for evaluating conditions as true or false. 25. What operator, also called RESTRICT, retrieves rows that meet a condition? A. JOIN B. PROJECT C. SELECT D. UNION Correct Answer: C. Rationale: SELECT (RESTRICT) filters rows based on a condition. 26. What is another name for the product operation yielding all pairs of rows from two tables? A. JOIN B. Outer join C. Cartesian product D. Union Correct Answer: C. Rationale: A Cartesian product returns all combinations of rows between two tables.

Content preview

Data Management-Applications TEST
QUESTIONS EXAM ACCURATE AND
VERIFIED ACTUAL EXAM QUESTIONS WITH
DETAILED ANSWERS FOR GUARANTEED
PASS | ALREADY GRADED A
1. When a product is deleted from the product table, all corresponding rows for the product in
the pricing table are deleted automatically as well. What is this referential integrity technique
called?
A. Restrict delete
B. Set-to-null
C. Cascaded delete ✅
D. Soft delete
Correct Answer: C. Cascaded delete
Rationale: Cascaded delete ensures that when a row in the parent table is deleted,
corresponding rows in the child table are automatically deleted.

2. What does the clause PRIMARY KEY followed by a field name in parentheses mean in a
CREATE TABLE statement?
A. The table will be indexed
B. The column is a unique constraint
C. The column is a foreign key
D. The column is the primary key for the table ✅
Correct Answer: D. The column is the primary key for the table
Rationale: The PRIMARY KEY clause specifies that the listed column uniquely identifies each row
in the table.

3. Which ALTER TABLE statement adds a foreign key constraint to a child table?
A. ALTER TABLE child ADD CONSTRAINT fk FOREIGN KEY (par_id);
B. ALTER TABLE parent ADD FOREIGN KEY (par_id);
C. ALTER TABLE child ADD FOREIGN KEY (par_id) REFERENCES parent (par_id) ON DELETE
CASCADE; ✅
D. ALTER TABLE parent ADD COLUMN par_id FOREIGN KEY;

,Correct Answer: C.
Rationale: This statement adds a foreign key with a cascading delete rule to maintain referential
integrity.

4. How does Table 2 affect the returned results from Table 1 in a LEFT JOIN?
A. Only matching rows from Table 1 are returned
B. All rows from Table 2 are returned
C. All rows from Table 1 are returned regardless of matches ✅
D. Only non-matching rows are returned
Correct Answer: C.
Rationale: LEFT JOIN returns all rows from the left (first) table, even if there's no match in the
right table.

5. Which command functions as a RIGHT JOIN with the roles of the tables reversed?
A. Cross join
B. Inner join
C. Left join ✅
D. Full join
Correct Answer: C. Left join
Rationale: LEFT JOIN with reversed table positions yields the same result as a RIGHT JOIN.

6. What does the LEFT JOIN statement do in: SELECT t1., t2. FROM t1 LEFT JOIN t2 ON t1.i1 =
t2.i2?
A. Selects all rows from both tables
B. Selects only rows with matches in both tables
C. Selects all rows in Table 1 and matching rows in Table 2 ✅
D. Selects all rows in Table 2 and matching rows in Table 1
Correct Answer: C.
Rationale: LEFT JOIN includes all rows from the left table and matches from the right table.

7. What is the difference between COUNT(*) and COUNT(col_name)?
A. No difference
B. COUNT() counts all rows; COUNT(col_name) counts non-null values only ✅
C. COUNT() counts distinct values only
D. COUNT(col_name) counts all rows
Correct Answer: B.
Rationale: COUNT(*) includes nulls, whereas COUNT(column) excludes them.

8. How does a row subquery differ from a table subquery?
A. Row subquery returns multiple rows

, B. Table subquery returns scalar values
C. Row subquery returns a single row with one or more columns ✅
D. Table subquery returns a single value
Correct Answer: C.
Rationale: A row subquery returns exactly one row with one or more columns.

9. What is a unary relationship?
A. Relationship between two different tables
B. Relationship with composite keys
C. Relationship between instances of a single entity type ✅
D. Relationship in a recursive join
Correct Answer: C.
Rationale: A unary relationship links rows within the same table/entity.

10. Which delete rule sets column values in a child table to a missing value when the matching
data is deleted from the parent table?
A. Cascade
B. Restrict
C. Set-to-default
D. Set-to-null ✅
Correct Answer: D.
Rationale: Set-to-null nullifies the foreign key in the child table when the parent is deleted.

11. In which normal form is data that has a simple primary key and no repeating groups?
A. First
B. Second ✅
C. Third
D. Boyce-Codd
Correct Answer: B.
Rationale: Second normal form requires a primary key and the elimination of repeating groups.

12. What does WHERE identify in a basic SQL SELECT statement?
A. Columns to display
B. Tables to use
C. Sorting order
D. Rows to be included ✅
Correct Answer: D.
Rationale: The WHERE clause filters which rows will be returned by the query.

Document information

Uploaded on
June 17, 2025
Number of pages
23
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$11.49

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.
lisarhodes411
3.9
(7)
Sold
37
Followers
2
Items
2126
Last sold
1 week 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