Databases & DBMS MCQs

20 practice MCQs on this page Page 7 of 16

Tap an option to check your answer — the correct answer and full explanation appear after you choose.

Computer ScienceDatabases & DBMS PPSCID: LTP-7655

What is a Database Management System (DBMS)?

  1. AA computer printer
  2. BA web browser
  3. CA type of keyboard
  4. DSoftware that manages databases ✓ Correct answer
Computer ScienceDatabases & DBMS PPSCID: LTP-7656

Which property must a primary key always have?

  1. AUnique and not null ✓ Correct answer
  2. BIt may repeat in every row
  3. CIt must contain text only
  4. DIt must be a foreign key
Computer ScienceDatabases & DBMS PPSCID: LTP-7657

A foreign key in a table is used to refer to which of the following?

  1. AThe password of the user
  2. BThe primary key of another table ✓ Correct answer
  3. CThe name of the database server
  4. DA deleted record
Computer ScienceDatabases & DBMS PPSCID: LTP-7658

The main purpose of normalisation in database design is to:

  1. AIncrease data duplication
  2. BSlow down queries
  3. CReduce data redundancy ✓ Correct answer
  4. DDelete all indexes
Computer ScienceDatabases & DBMS PPSCID: LTP-7659

A table is in First Normal Form (1NF) when all of its values are:

  1. ARepeated in every row
  2. BStored as images
  3. CEncrypted
  4. DAtomic ✓ Correct answer
Computer ScienceDatabases & DBMS PPSCID: LTP-7660

In SQL, which constraint is used to specify that a column cannot contain a NULL value?

  1. ANOT NULL ✓ Correct answer
  2. BUNIQUE
  3. CPRIMARY KEY
  4. DCHECK
Computer ScienceDatabases & DBMS PPSCID: LTP-7662

In the ACID properties of a database transaction, the letter A stands for:

  1. AAccuracy
  2. BAvailability
  3. CAtomicity ✓ Correct answer
  4. DAuthority
Computer ScienceDatabases & DBMS PPSCID: LTP-7663

Which of the following is an advantage of a DBMS over a simple file system?

  1. AData can only be stored once
  2. BOnly one user can access data
  3. CNo backup is possible
  4. DData independence and less redundancy ✓ Correct answer
Computer ScienceDatabases & DBMS PPSCID: LTP-7664

In an Entity-Relationship (ER) model, an entity represents:

  1. AA real-world object or thing ✓ Correct answer
  2. BA computer virus
  3. CA network cable
  4. DA user password
Computer ScienceDatabases & DBMS PPSCID: LTP-7665

A candidate key is best described as a key that is:

  1. AAlways a foreign key
  2. BA minimal superkey ✓ Correct answer
  3. CNever unique
  4. DOnly used for sorting
Computer ScienceDatabases & DBMS PPSCID: LTP-7666

In a database, a transaction is best defined as:

  1. AA printed report
  2. BA backup file
  3. CA single unit of work ✓ Correct answer
  4. DA user login
Computer ScienceDatabases & DBMS PPSCID: LTP-7740

In database design, Second Normal Form (2NF) requires that a table is in 1NF and that every non-key column depends on:

  1. AThe whole primary key ✓ Correct answer
  2. BOnly part of the key
  3. CNo key at all
  4. DThe foreign key only
Computer ScienceDatabases & DBMS PPSCID: LTP-7741

Third Normal Form (3NF) removes which kind of dependency from a table?

  1. APrimary key
  2. BTransitive dependency ✓ Correct answer
  3. CForeign key
  4. DIndex
Computer ScienceDatabases & DBMS PPSCID: LTP-7742

Boyce-Codd Normal Form (BCNF) is a stronger version of which normal form?

  1. AFirst Normal Form
  2. BFourth Normal Form
  3. CThird Normal Form ✓ Correct answer
  4. DFifth Normal Form
Computer ScienceDatabases & DBMS PPSCID: LTP-7743

In SQL, the Data Definition Language (DDL) includes which of the following commands?

  1. ASELECT
  2. BINSERT
  3. CUPDATE
  4. DCREATE ✓ Correct answer
Computer ScienceDatabases & DBMS PPSCID: LTP-7744

In SQL, the Data Manipulation Language (DML) includes which of the following commands?

  1. AINSERT ✓ Correct answer
  2. BCREATE
  3. CDROP
  4. DGRANT
Computer ScienceDatabases & DBMS PPSCID: LTP-7745

In SQL, the GRANT command belongs to which language category?

  1. AData Definition Language
  2. BData Control Language (DCL) ✓ Correct answer
  3. CData Manipulation Language
  4. DQuery Language
Computer ScienceDatabases & DBMS PPSCID: LTP-7746

Which SQL command is used to save all changes made by a transaction permanently?

  1. AROLLBACK
  2. BSAVEPOINT
  3. CCOMMIT ✓ Correct answer
  4. DDELETE
Computer ScienceDatabases & DBMS PPSCID: LTP-7747

Which SQL command undoes all changes made by the current transaction?

  1. ACOMMIT
  2. BGRANT
  3. CCREATE
  4. DROLLBACK ✓ Correct answer
Computer ScienceDatabases & DBMS PPSCID: LTP-7748

An INNER JOIN between two tables returns:

  1. AOnly rows that match in both tables ✓ Correct answer
  2. BAll rows from the left table only
  3. CAll rows from both tables
  4. DNo rows at all

Practice these MCQs interactively