
DBMS

Quiz
•
Computers
•
University
•
Hard
Phanideep Phanideep
Used 1+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
You are designing a database for a university. Each department can offer multiple courses, and each course can be taught by multiple instructors. However, each course can be associated with only one department. How would you represent this relationship in an ER diagram?
A many-to-many relationship between Department and Course, with a connecting entity for Instructor
A one-to-many relationship between Department and Course, with a many-to-many relationship between Course and Instructor
A one-to-many relationship between Department and Instructor, with a many-to-many relationship between Course and Department
A one-to-many relationship between Instructor and Course, with a one-to-many relationship between Department and Instructor
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
In a banking application, you need to store the history of transactions. Each transaction can be associated with one or more accounts, and you need to ensure data integrity and avoid anomalies. Which normalization level should be applied to the transaction table?
1NF
2NF
3NF
BCNF
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A database for a hospital needs to ensure that patient records cannot be deleted as long as they have associated medical records. Which of the following constraints would you use to enforce this rule?
PRIMARY KEY
FOREIGN KEY with ON DELETE CASCADE
FOREIGN KEY with ON DELETE NO ACTION
UNIQUE
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
You need to retrieve the top 5 highest-paid employees in each department from the employees table, which has columns emp_id, department_id, and salary. Which SQL query would you use?
SELECT emp_id, department_id, salary FROM employees ORDER BY department_id, salary DESC LIMIT 5;
SELECT emp_id, department_id, salary FROM employees WHERE salary IN (SELECT DISTINCT TOP 5 salary FROM employees ORDER BY department_id, salary DESC);
SELECT emp_id, department_id, salary FROM (SELECT emp_id, department_id, salary, DENSE_RANK() OVER (PARTITION BY department_id ORDER BY salary DESC) as rank FROM employees) WHERE rank <= 5;
SELECT emp_id, department_id, salary FROM employees GROUP BY department_id ORDER BY salary DESC LIMIT 5;
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A sales database has a table orders with columns order_id, customer_id, order_date, and total_amount. You are asked to find the total revenue generated for each customer in the current year. Which SQL query would you use?
A sales database has a table orders with columns order_id, customer_id, order_date, and total_amount. You are asked to find the total revenue generated for each customer in the current year. Which SQL query would you use?
SELECT customer_id, SUM(total_amount) FROM orders WHERE order_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 1 YEAR) GROUP BY customer_id;
SELECT customer_id, total_amount FROM orders WHERE YEAR(order_date) = YEAR(CURRENT_DATE());
SELECT customer_id, SUM(total_amount) FROM orders WHERE order_date BETWEEN DATE_SUB(CURRENT_DATE(), INTERVAL 1 YEAR) AND CURRENT_DATE() GROUP BY customer_id;
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A university database contains a table with student IDs and their grades. To find students who have received the same grade in multiple subjects, which SQL clause combination would be most appropriate?
SELECT, WHERE
GROUP BY, HAVING
ORDER BY, LIMIT
DISTINCT, COUNT
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A database is experiencing performance issues due to the large size of a particular table. Which of the following techniques would most likely improve query performance?
Add more columns to the table
Normalize the table
Denormalize the table
Denormalize the table
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
AACS3013 Quick Revision C1-C3

Quiz
•
University
18 questions
Database Management System

Quiz
•
12th Grade - Professi...
20 questions
Insert, Delete data & using Images

Quiz
•
University
20 questions
Databases

Quiz
•
12th Grade - University
15 questions
MANAGEMENT INFORMATION SYSTEMS

Quiz
•
University
15 questions
DBC CHAPTER 2 - REVISION

Quiz
•
University
15 questions
Quiz App Móviles para Android

Quiz
•
University
23 questions
SQLite

Quiz
•
4th Grade - University
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Would you rather...

Quiz
•
KG - University
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
10 questions
The Constitution, the Articles, and Federalism Crash Course US History

Interactive video
•
11th Grade - University
7 questions
Figurative Language: Idioms, Similes, and Metaphors

Interactive video
•
4th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
16 questions
Water Modeling Activity

Lesson
•
11th Grade - University
10 questions
ACT English prep

Quiz
•
9th Grade - University