
dbms lab quiz 1

Quiz
•
Computers
•
University
•
Hard
Prateek Soni
Used 4+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 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
1 min • 1 pt
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
1 min • 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
1 min • 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?
PRIMARY KEY
UNIQUE
CHECK
FOREIGN KEY
5.
MULTIPLE CHOICE QUESTION
1 min • 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
6.
MULTIPLE CHOICE QUESTION
1 min • 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';
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
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
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Administration Database

Quiz
•
University - Professi...
10 questions
Postest MODUL 5

Quiz
•
University
15 questions
Day 1 - Deployment ...

Quiz
•
University
10 questions
SQL Basic

Quiz
•
University
15 questions
Key and constrain

Quiz
•
University
15 questions
UAS Rekayasa Sistem Informasi SI-VII

Quiz
•
University
15 questions
POST-TEST MODUL 1 APSI

Quiz
•
University
10 questions
WEBDEV101

Quiz
•
University
Popular Resources on Wayground
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World

Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
20 questions
ELA Advisory Review

Quiz
•
7th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns

Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
11 questions
NFL Football logos

Quiz
•
KG - Professional Dev...
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

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

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
38 questions
Unit 6 Key Terms

Quiz
•
11th Grade - University
20 questions
La Hora

Quiz
•
9th Grade - University
7 questions
Cell Transport

Interactive video
•
11th Grade - University
7 questions
What Is Narrative Writing?

Interactive video
•
4th Grade - University