Databases & DBMS MCQs

20 practice MCQs on this page Page 14 of 16

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

Computer ScienceDatabases & DBMSID: DB-006

In an ER diagram, a multi-valued attribute is drawn as a:

  1. ASingle ellipse
  2. BDashed ellipse
  3. CDouble ellipse ✓ Correct answer
  4. DUnderlined ellipse
Computer ScienceDatabases & DBMSID: DB-007

In an ER diagram, a derived attribute — one calculated from other attributes, such as age from date of birth — is drawn as a:

  1. ADouble ellipse
  2. BUnderlined ellipse
  3. CDashed ellipse ✓ Correct answer
  4. DDouble rectangle
Computer ScienceDatabases & DBMSID: DB-008

A composite attribute in an ER model is one that:

  1. ACan be divided into smaller parts, such as a name into first and last name ✓ Correct answer
  2. BHas many values at once
  3. CIs calculated from another attribute
  4. DUniquely identifies an entity
Computer ScienceDatabases & DBMSID: DB-009

A relationship in which three entity sets take part is called a:

  1. AUnary relationship
  2. BBinary relationship
  3. CTernary relationship ✓ Correct answer
  4. DRecursive relationship
Computer ScienceDatabases & DBMSID: DB-010

In an ER model, total participation means that:

  1. AEvery entity in the set must take part in the relationship ✓ Correct answer
  2. BOnly some entities take part in the relationship
  3. CThe relationship is many-to-many
  4. DThe entity has no key
Computer ScienceDatabases & DBMSID: DB-011

A strong entity differs from a weak entity because a strong entity:

  1. AHas its own primary key and can exist on its own ✓ Correct answer
  2. BDepends on an owner entity
  3. CHas no attributes
  4. DIs always drawn with a double rectangle
Computer ScienceDatabases & DBMSID: DB-012

When an ER diagram with a many-to-many relationship is converted into tables, the relationship is stored in:

  1. AThe table of the first entity
  2. BThe table of the second entity
  3. CA new separate table holding both primary keys ✓ Correct answer
  4. DNo table at all
Computer ScienceDatabases & DBMSID: DB-013

When a one-to-many relationship is converted into tables, the primary key of the 'one' side is placed as a foreign key in:

  1. AA new separate table
  2. BBoth tables
  3. CThe table on the 'one' side
  4. DThe table on the 'many' side ✓ Correct answer
Computer ScienceDatabases & DBMSID: DB-014

The Entity-Relationship model was proposed by Peter Chen in:

  1. A1966
  2. B1996
  3. C1986
  4. D1976 ✓ Correct answer
Computer ScienceDatabases & DBMSID: DB-015

A super key in a relational table is:

  1. AA minimal set of columns that identifies a row
  2. BA key that links two tables
  3. CThe key chosen as the primary key
  4. DAny set of columns that uniquely identifies each row ✓ Correct answer
Computer ScienceDatabases & DBMSID: DB-016

An alternate key is a candidate key that:

  1. AWas not chosen as the primary key ✓ Correct answer
  2. BLinks two tables
  3. CContains duplicate values
  4. DIs made of a single column only
Computer ScienceDatabases & DBMSID: DB-017

In the relational model, a domain is:

  1. AA row of a table
  2. BThe primary key of a table
  3. CA relationship between tables
  4. DThe set of permitted values for an attribute ✓ Correct answer
Computer ScienceDatabases & DBMSID: DB-018

The entity integrity rule of the relational model states that:

  1. AA foreign key must match a primary key
  2. BA primary key may repeat once
  3. CEvery table must have a foreign key
  4. DNo part of a primary key may be null ✓ Correct answer
Computer ScienceDatabases & DBMSID: DB-019

The referential integrity rule states that a foreign key value must either be null or:

  1. AMatch a primary key value in the referenced table ✓ Correct answer
  2. BBe larger than the primary key
  3. CBe unique in its own table
  4. DContain only numbers
Computer ScienceDatabases & DBMSID: DB-020

Which of the following is true of a foreign key?

  1. AIt must be unique in every row
  2. BIt must be the primary key of its own table
  3. CIt cannot be part of any index
  4. DIt may repeat and may be null unless restricted ✓ Correct answer
Computer ScienceDatabases & DBMSID: DB-021

The degree of a relation is the number of:

  1. ARows in the table
  2. BKeys in the table
  3. CTables in the database
  4. DAttributes (columns) of the table ✓ Correct answer
Computer ScienceDatabases & DBMSID: DB-022

The cardinality of a relation is the number of:

  1. AAttributes of the table
  2. BRelationships of the table
  3. CCandidate keys
  4. DTuples (rows) in the table ✓ Correct answer
Computer ScienceDatabases & DBMSID: DB-023

Which SQL command changes the values already stored in a row?

  1. AINSERT
  2. BSELECT
  3. CDELETE
  4. DUPDATE ✓ Correct answer
Computer ScienceDatabases & DBMSID: DB-024

Which SQL command takes back a privilege that was given with GRANT?

  1. AREVOKE ✓ Correct answer
  2. BREMOVE
  3. CDENY
  4. DDROP
Computer ScienceDatabases & DBMSID: DB-025

In a transaction, a SAVEPOINT is used to:

  1. ASave the whole database to disk
  2. BMark a point to roll back to without undoing the whole transaction ✓ Correct answer
  3. CGrant a privilege to a user
  4. DCreate a backup copy of a table

Practice these MCQs interactively