
DBMS Lab Quiz Sec G2
Authored by Dr Surendra Kumar
Science
University
Used 2+ 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
30 sec • 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_yearINT;
UPDATE TABLE Books SET publication_year = 2023;
INSERT INTO Books (publication_year) VALUES (2023);
DELETE COLUMN publication_year FROM Books;
2.
MULTIPLE CHOICE QUESTION
30 sec • 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
30 sec • 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?
VARCHAR(20)
INT
CHAR(5)
DATE
4.
MULTIPLE CHOICE QUESTION
30 sec • 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?
UPDATE Accounts SET balance = balance - 500 WHERE account_number = 123;
UPDATE Accounts SET balance = balance + 500 WHERE account_number = 456;
INSERT INTO Transactions (from_account, to_account, amount) VALUES (123, 456, 500);
A combination of A and B
5.
MULTIPLE CHOICE QUESTION
30 sec • 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?
SELECT * FROM Cars WHERE status = 'Available' AND rental_date = '2023-09-15';
SELECT * FROM Cars WHERE status = 'Rented' AND rental_date<> '2023-09-15';
SELECT * FROM Cars WHERE status = 'Available' AND rental_date IS NULL;
SELECT * FROM Cars WHERE status = 'Available' AND 'rental_date' = '2023-09-15';
6.
MULTIPLE CHOICE QUESTION
30 sec • 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?
PRIMARY KEY
Check
FOREIGN KEY
Unique
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
As part of our efforts to enhance our database, we want to implement specific requirements to improve the quality of customer information. We need to validate two criteria: First, customers must be at least 21 years old, and second, they must have a residence in an Asian country. Which type of SQL constraint should we use to enforce these requirements?
Customer must be greater than 21 years old
Customer must have a residence in an Asian Country
Both A and B
None of these
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
14 questions
Light & Seeing the coloured objects
Quiz
•
KG - University
10 questions
Virtual Field Trip Naxos
Quiz
•
University
15 questions
Modals Verbs English VII
Quiz
•
University
14 questions
Metabolism and Chloroplast Review
Quiz
•
9th Grade - University
14 questions
General knowledge quiz
Quiz
•
5th Grade - Professio...
10 questions
QUIZ 1- NUTRITION & DIET
Quiz
•
University
10 questions
microbiology quiz one
Quiz
•
University
10 questions
Earthquake worksheet
Quiz
•
4th Grade - University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
10 questions
Probability Practice
Quiz
•
4th Grade
15 questions
Probability on Number LIne
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
6 questions
Appropriate Chromebook Usage
Lesson
•
7th Grade
10 questions
Greek Bases tele and phon
Quiz
•
6th - 8th Grade