
D2 DBMS LAB QUIZ
Authored by Nand Yadav
Computers
University
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
You need to modify an existing database table BOOKS by adding a new column to store the publication year of books. Which SQL statement should you use?
ALTER TABLE Books ADD COLUMN publication_year INT;
UPDATE TABLE Books SET publication_year = 2023;
INSERT INTO Books (publication_year) VALUES (2023);
DELETE COLUMN publication_year FROM Books;
2.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
. You are responsible for maintaining a database of customer orders for an online store. You need to update the price of a product with ID 101 to $19.99. Which SQL statement should you use?
SELECT * FROM Products WHERE product_id = 101;
DELETE FROM Products WHERE product_id = 101;
UPDATE Products SET price = 19.99 WHERE product_id = 101;
INSERT INTO Products (product_id, price) VALUES (101, 19.99);
3.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
You are designing a database for an e-commerce platform. You need to create a table to store customer addresses, including street address, city, state, and postal code. Which data type would be most appropriate for the postal code column?
A) VARCHAR(20)
B) INT
C) CHAR(5)
D) DATE
4.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
You are working on a database for a social media platform. You need to create a table to store user profiles, including their usernames, email addresses, and profile pictures. Which SQL constraint should be used to ensure that usernames are unique?
A) PRIMARY KEY
B) UNIQUE
C) CHECK
D) FOREIGN KEY
5.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
You are managing a database for a bank. You need to transfer $500 from one customer's account to another customer's account. Which SQL statement(s) should you use to perform this transfer?
A) UPDATE Accounts SET balance = balance - 500 WHERE account_number = 123;
B) UPDATE Accounts SET balance = balance + 500 WHERE account_number = 456;
C) INSERT INTO Transactions (from_account, to_account, amount) VALUES (123, 456, 500);
D) A combination of A and B
6.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
You are developing a database for a car rental company. You need to retrieve a list of available cars for rent on a specific date. Which SQL query should you use?
A) SELECT * FROM Cars WHERE status = 'Available' AND rental_date = '2023-09-15';
B) SELECT * FROM Cars WHERE status = 'Rented' AND rental_date <> '2023-09-15';
C) SELECT * FROM Cars WHERE status = 'Available' AND rental_date IS NULL;
D) SELECT * FROM Cars WHERE status = 'Available' AND 'rental_date' = '2023-09-15';
7.
MULTIPLE CHOICE QUESTION
3 mins • 1 pt
You are designing a database for an online store. You want to ensure that product prices are always greater than or equal to $5. Which SQL constraint should you use to enforce this rule?
A) PRIMARY KEY
B) CHECK
C) FOREIGN KEY
D) UNIQUE
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
4.6.4 Logic Gates
Quiz
•
10th Grade - Professi...
15 questions
ADVACOMT-Quiz No.1 (final term)
Quiz
•
University
10 questions
Web-II-Loop and Function
Quiz
•
University
10 questions
Abhyudaya coding class - Grade 7
Quiz
•
6th Grade - University
10 questions
Què en saps de GSuite?
Quiz
•
University - Professi...
15 questions
Firewall and Network Security
Quiz
•
University
10 questions
Soal SKD
Quiz
•
University - Professi...
12 questions
Porcentajes
Quiz
•
University
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
5 questions
What is Presidents' Day?
Interactive video
•
10th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
20 questions
Mardi Gras History
Quiz
•
6th Grade - University
10 questions
The Roaring 20's Crash Course US History
Interactive video
•
11th Grade - University
17 questions
Review9_TEACHER
Quiz
•
University