• 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 30 pages
Exam (elaborations)

DM 2 – Database Design and Development 3

Document preview thumbnail
Preview 3 out of 30 pages

DM 2 – Database Design and Development 3

Content preview

1. A stored procedure in SQL is:

A. A precompiled set of SQL statements that can be executed.

B. A temporary table used to store query results.

C. A method for normalizing data.

D. A database function that returns a value.

Answer: A

Rationale: A stored procedure is a precompiled set of SQL statements that can be

executed repeatedly, which helps with code reuse and performance optimization.




2. Which of the following would be a composite attribute in an entity-relationship

diagram?

A. Name

B. Address

C. Phone number

D. Date of birth

Answer: B

,Rationale: An address is a composite attribute because it consists of multiple sub-

attributes such as street, city, state, and postal code.




3. Which SQL clause is used to filter records in a SELECT statement?

A. WHERE

B. GROUP BY

C. ORDER BY

D. HAVING

Answer: A

Rationale: The WHERE clause is used to filter records based on a specified

condition in a SELECT statement.




4. A trigger in a database is used to:

A. Automatically execute predefined actions in response to certain events.

B. Create a backup of the database.

C. Aggregate data from multiple tables.

D. Index a column for faster queries.

Answer: A

, Rationale: A trigger automatically executes a predefined action, such as inserting,

updating, or deleting data, in response to events like an INSERT or UPDATE.




5. What is an index used for in a database?

A. To store large amounts of data.

B. To increase query performance by allowing faster lookups.

C. To ensure referential integrity.

D. To group data together for backup purposes.

Answer: B

Rationale: An index is a database object that improves the speed of data retrieval

operations by allowing faster searches and lookups based on indexed columns.




6. What is the purpose of the SQL HAVING clause?

A. To filter records after aggregation.

B. To group data based on a column.

C. To create new views.

D. To define foreign keys.

Answer: A

Document information

Uploaded on
March 17, 2025
Number of pages
30
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
douglasmugwe82
5.0
(1)
Sold
2
Followers
0
Items
4215
Last sold
1 year 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