ICT Database Management Concepts 5 — Questions and Answers
Question 1: Which SQL statement is used to modify existing records in a table?
- INSERT
- ALTER
- UPDATE (Correct answer)
- MODIFY
Correct answer: UPDATE
The UPDATE statement changes existing data in one or more rows of a table based on a specified condition.
Question 2: What is data integrity in a database?
- The speed at which data can be retrieved
- The accuracy, consistency, and reliability of data stored in a database (Correct answer)
- The process of encrypting all database fields
- The method of compressing stored data
Correct answer: The accuracy, consistency, and reliability of data stored in a database
Data integrity ensures that data remains accurate, consistent, and trustworthy throughout its lifecycle in the database.
Question 3: Which type of database backup copies only the data that has changed since the last full backup?
- Full backup
- Incremental backup (Correct answer)
- Mirror backup
- Snapshot backup
Correct answer: Incremental backup
An incremental backup saves only the data that has changed since the last backup, reducing storage and time requirements.
Question 4: What is a composite key in a relational database?
- A key that is encrypted using two algorithms
- A primary key made up of two or more columns (Correct answer)
- A foreign key referencing two tables
- A key that allows NULL values
Correct answer: A primary key made up of two or more columns
A composite key uses two or more columns together to uniquely identify a row in a table.
Question 5: Which SQL command is used to add a new column to an existing table?
- INSERT
- UPDATE
- ALTER TABLE ... ADD (Correct answer)
- CREATE COLUMN
Correct answer: ALTER TABLE ... ADD
ALTER TABLE with the ADD clause modifies an existing table's structure by adding a new column.
Question 6: What is the difference between DELETE and DROP in SQL?
- DELETE removes the table; DROP removes rows
- DELETE removes rows from a table; DROP removes the entire table (Correct answer)
- They are identical commands with different syntax
- DELETE is for indexes; DROP is for tables
Correct answer: DELETE removes rows from a table; DROP removes the entire table
DELETE removes specific rows from a table while leaving the structure intact; DROP removes the entire table including its structure.
Question 7: In the context of databases, what is sharding?
- Encrypting database records for security
- Splitting a large database horizontally across multiple servers (Correct answer)
- Compressing old data to save disk space
- Creating read-only copies of a database
Correct answer: Splitting a large database horizontally across multiple servers
Sharding is a horizontal scaling technique that partitions data across multiple database instances to improve performance and capacity.
Which SQL statement is used to modify existing records in a table?