Databases & DBMS MCQs
20 practice MCQs on this page Page 11 of 16
Tap an option to check your answer — the correct answer and full explanation appear after you choose.
Computer ScienceDatabases & DBMS PPSCID: LTP-8300
Which key uniquely identifies each row in a relational database table?
- APrimary key ✓ Correct answer
- BForeign key
- CCandidate key
- DComposite key
✓ Correct answer: Primary key
Full explanation
A Primary key uniquely identifies each row in a relational database table and cannot contain duplicate or null values.
Computer ScienceDatabases & DBMS PPSCID: LTP-8301
Which SQL statement is used to add a new row to a table?
- AUPDATE
- BINSERT ✓ Correct answer
- CADD
- DCREATE
✓ Correct answer: INSERT
Full explanation
INSERT adds a new row to a table. UPDATE changes existing rows, CREATE makes a new table, and ADD is not an SQL statement for rows.
Computer ScienceDatabases & DBMS PPSCID: LTP-8303
Which SQL statement retrieves data from a table?
- AINSERT
- BUPDATE
- CDELETE
- DSELECT ✓ Correct answer
✓ Correct answer: SELECT
Full explanation
The SELECT statement retrieves data from a table in SQL.
Computer ScienceDatabases & DBMS PPSCID: LTP-8304
Which database process removes redundancy by organising data into related tables?
- ANormalization ✓ Correct answer
- BDenormalization
- CIndexing
- DClustering
✓ Correct answer: Normalization
Full explanation
Normalization removes redundancy by organising data into related tables, reducing duplicate data.
Computer ScienceDatabases & DBMS PPSCID: LTP-8305
Which normal form requires that every column holds atomic values only?
- ASecond Normal Form
- BFirst Normal Form (1NF) ✓ Correct answer
- CThird Normal Form
- DBoyce-Codd Normal Form
✓ Correct answer: First Normal Form (1NF)
Full explanation
First Normal Form (1NF) requires that every column holds atomic values only, with no repeating groups.
Computer ScienceDatabases & DBMS PPSCID: LTP-8306
Which set of properties guarantees reliable database transactions?
- ACAP theorem
- BCRUD operations
- CACID properties ✓ Correct answer
- DBASE properties
✓ Correct answer: ACID properties
Full explanation
ACID properties — Atomicity, Consistency, Isolation, Durability — guarantee reliable database transactions.
Computer ScienceDatabases & DBMS PPSCID: LTP-8307
Which database model stores data in tables made of rows and columns?
- AHierarchical model
- BNetwork model
- CDocument model
- DRelational model ✓ Correct answer
✓ Correct answer: Relational model
Full explanation
The Relational model stores data in tables made of rows and columns, with relationships defined by keys.
Computer ScienceDatabases & DBMS PPSCID: LTP-8308
Which database structure speeds up searching by providing fast access to rows?
- AIndex ✓ Correct answer
- BView
- CTrigger
- DStored procedure
✓ Correct answer: Index
Full explanation
An Index speeds up searching by providing fast access to rows, like an index in a book.
Computer ScienceDatabases & DBMS PPSCID: LTP-8405
Which SQL statement adds a new row to a table?
- ASELECT
- BINSERT ✓ Correct answer
- CUPDATE
- DDELETE
✓ Correct answer: INSERT
Full explanation
The INSERT statement adds a new row to a table in SQL.
Computer ScienceDatabases & DBMS PPSCID: LTP-8407
Which SQL statement removes rows from a table?
- ADROP
- BTRUNCATE
- CUPDATE
- DDELETE ✓ Correct answer
✓ Correct answer: DELETE
Full explanation
The DELETE statement removes rows from a table in SQL.
Computer ScienceDatabases & DBMS PPSCID: LTP-8408
Which SQL statement creates a new table in a database?
- ACREATE TABLE ✓ Correct answer
- BALTER TABLE
- CDROP TABLE
- DSELECT
✓ Correct answer: CREATE TABLE
Full explanation
The CREATE TABLE statement creates a new table in a database.
Computer ScienceDatabases & DBMS PPSCID: LTP-8409
Which normal form requires a table to be in 1NF with no partial dependency on a composite key?
- AFirst Normal Form
- BSecond Normal Form (2NF) ✓ Correct answer
- CThird Normal Form
- DBoyce-Codd Normal Form
✓ Correct answer: Second Normal Form (2NF)
Full explanation
Second Normal Form (2NF) requires a table to be in 1NF with no partial dependency on a composite key.
Computer ScienceDatabases & DBMS PPSCID: LTP-8410
Which normal form removes transitive dependencies between non-key columns?
- AFirst Normal Form
- BSecond Normal Form
- CThird Normal Form (3NF) ✓ Correct answer
- DFourth Normal Form
✓ Correct answer: Third Normal Form (3NF)
Full explanation
Third Normal Form (3NF) removes transitive dependencies between non-key columns.
Computer ScienceDatabases & DBMS PPSCID: LTP-8411
Which unit of database work must be completed fully or not at all?
- AQuery
- BView
- CIndex
- DTransaction ✓ Correct answer
✓ Correct answer: Transaction
Full explanation
A Transaction is a unit of database work that must be completed fully or not at all.
Computer ScienceDatabases & DBMS PPSCID: LTP-8412
Which database object is a virtual table created from a saved query?
- AView ✓ Correct answer
- BIndex
- CTrigger
- DStored procedure
✓ Correct answer: View
Full explanation
A View is a virtual table created from a saved query, showing selected data without storing it separately.
Computer ScienceDatabases & DBMS PPSCID: LTP-8413
Which problem means the same data is stored in several places and can become inconsistent?
- AData integrity
- BData redundancy ✓ Correct answer
- CData independence
- DData security
✓ Correct answer: Data redundancy
Full explanation
Data redundancy means the same data is stored in several places and can become inconsistent when one copy changes.
Computer ScienceDatabases & DBMS PPSCID: LTP-8414
Which model uses entities and relationships to design a database?
- ARelational model
- BHierarchical model
- CEntity-Relationship (ER) model ✓ Correct answer
- DNetwork model
✓ Correct answer: Entity-Relationship (ER) model
Full explanation
The Entity-Relationship (ER) model uses entities and relationships to design a database.
Computer ScienceDatabases & DBMS PPSCID: LTP-8495
Which SQL statement permanently removes a table and its data?
- ADELETE
- BTRUNCATE
- CUPDATE
- DDROP TABLE ✓ Correct answer
✓ Correct answer: DROP TABLE
Full explanation
The DROP TABLE statement permanently removes a table and its data from the database.
Computer ScienceDatabases & DBMS PPSCID: LTP-8496
Which SQL statement changes the structure of an existing table?
- AALTER TABLE ✓ Correct answer
- BCREATE TABLE
- CDROP TABLE
- DSELECT
✓ Correct answer: ALTER TABLE
Full explanation
The ALTER TABLE statement changes the structure of an existing table, for example adding a column.
Computer ScienceDatabases & DBMS PPSCID: LTP-8497
Which SQL clause filters rows based on a condition?
- AORDER BY clause
- BWHERE clause ✓ Correct answer
- CGROUP BY clause
- DHAVING clause
✓ Correct answer: WHERE clause
Full explanation
The WHERE clause filters rows based on a condition in an SQL query.
Practice these MCQs interactively
← Computer Science MCQs