1. Which of the following is NOT a type of DBMS?
A. Hierarchical
B. Relational
C. Object-oriented
D. Network
Answer: D) Network
Rationale: The common DBMS types include hierarchical, relational, and object-oriented.
"Network" refers to a network model, not a DBMS type.
2. Which SQL statement is used to return the number of rows in a table?
A. SELECT COUNT()
B. SELECT SUM()
C. SELECT MAX()
D. SELECT MIN()
Answer: A) SELECT COUNT()
Rationale: The COUNT() function is used to return the number of rows in a table.
3. What is the difference between INNER JOIN and LEFT JOIN?
A. INNER JOIN returns only matching rows, LEFT JOIN returns all rows from the left table
,B. INNER JOIN returns all rows from both tables, LEFT JOIN returns only matching rows
C. INNER JOIN returns only unmatched rows
D. There is no difference
Answer: A) INNER JOIN returns only matching rows, LEFT JOIN returns all rows from the left
table
Rationale: An INNER JOIN returns rows with matching values in both tables, while a LEFT
JOIN returns all rows from the left table and matching rows from the right table.
4. Which SQL command is used to delete all rows from a table without removing the table
structure?
A. DROP
B. DELETE
C. REMOVE
D. TRUNCATE
Answer: D) TRUNCATE
Rationale: TRUNCATE removes all rows from a table but leaves the table structure intact.
5. What does ACID stand for in database systems?
A. Atomicity, Consistency, Isolation, Durability
B. Accuracy, Consistency, Integrity, Durability
C. Analysis, Consistency, Isolation, Durability
, D. Atomicity, Consistency, Integrity, Durability
Answer: A) Atomicity, Consistency, Isolation, Durability
Rationale: ACID is a set of properties that guarantee database transactions are processed reliably.
6. In SQL, which command is used to remove a table from a database?
A. DELETE
B. DROP
C. REMOVE
D. TRUNCATE
Answer: B) DROP
Rationale: The DROP command is used to delete a table and its structure from a database.
7. Which of the following is used to establish a relationship between two tables?
A. Foreign key
B. Primary key
C. Index
D. Trigger
Answer: A) Foreign key
Rationale: A foreign key is used to establish and enforce a link between the data in two tables.
A. Hierarchical
B. Relational
C. Object-oriented
D. Network
Answer: D) Network
Rationale: The common DBMS types include hierarchical, relational, and object-oriented.
"Network" refers to a network model, not a DBMS type.
2. Which SQL statement is used to return the number of rows in a table?
A. SELECT COUNT()
B. SELECT SUM()
C. SELECT MAX()
D. SELECT MIN()
Answer: A) SELECT COUNT()
Rationale: The COUNT() function is used to return the number of rows in a table.
3. What is the difference between INNER JOIN and LEFT JOIN?
A. INNER JOIN returns only matching rows, LEFT JOIN returns all rows from the left table
,B. INNER JOIN returns all rows from both tables, LEFT JOIN returns only matching rows
C. INNER JOIN returns only unmatched rows
D. There is no difference
Answer: A) INNER JOIN returns only matching rows, LEFT JOIN returns all rows from the left
table
Rationale: An INNER JOIN returns rows with matching values in both tables, while a LEFT
JOIN returns all rows from the left table and matching rows from the right table.
4. Which SQL command is used to delete all rows from a table without removing the table
structure?
A. DROP
B. DELETE
C. REMOVE
D. TRUNCATE
Answer: D) TRUNCATE
Rationale: TRUNCATE removes all rows from a table but leaves the table structure intact.
5. What does ACID stand for in database systems?
A. Atomicity, Consistency, Isolation, Durability
B. Accuracy, Consistency, Integrity, Durability
C. Analysis, Consistency, Isolation, Durability
, D. Atomicity, Consistency, Integrity, Durability
Answer: A) Atomicity, Consistency, Isolation, Durability
Rationale: ACID is a set of properties that guarantee database transactions are processed reliably.
6. In SQL, which command is used to remove a table from a database?
A. DELETE
B. DROP
C. REMOVE
D. TRUNCATE
Answer: B) DROP
Rationale: The DROP command is used to delete a table and its structure from a database.
7. Which of the following is used to establish a relationship between two tables?
A. Foreign key
B. Primary key
C. Index
D. Trigger
Answer: A) Foreign key
Rationale: A foreign key is used to establish and enforce a link between the data in two tables.