Database Basics Flashcards
7 cards from real Web Development practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 7 Database Basics flashcards as text
What is the purpose of the GROUP BY clause in SQL?
Answer: To combine rows with the same value into summary rows
GROUP BY groups rows that share the same values in specified columns so aggregate functions can be applied to each group.
Which NoSQL database type stores data as key-value pairs?
Answer: Key-value store
Key-value stores (like Redis) store data as pairs of unique keys and their associated values, optimized for fast lookups.
What does 'atomicity' mean in a database transaction?
Answer: The transaction either completes fully or not at all
Atomicity guarantees that all operations within a transaction succeed together or are all rolled back if any step fails.
What is a stored procedure in SQL?
Answer: A precompiled set of SQL statements stored and executed on the server
A stored procedure is a precompiled collection of SQL statements saved in the database that can be executed with a single call.
Which SQL keyword eliminates duplicate rows from a result set?
Answer: DISTINCT
SELECT DISTINCT removes duplicate rows from query results, returning only unique value combinations.
What is database sharding?
Answer: Splitting a database into smaller, faster pieces across multiple servers
Sharding horizontally partitions a database by distributing rows across multiple servers to improve scalability and performance.
Which constraint ensures that a column's value must already exist as a primary key in another table?
Answer: FOREIGN KEY
A FOREIGN KEY constraint enforces referential integrity by requiring that the column's value matches a primary key in the referenced table.
How this page was made: written with AI tools. We have not yet matched this exam's facts to an official source, so confirm fees, dates and rules with the exam body. Not reviewed by a subject-matter expert. Editorial policy