BrainTok
ENESIT

Databases: Relational model and relational algebra · Relations, Keys and Integrity

How the relational model organizes data into relations, and how keys and integrity constraints keep that data consistent.

Databases · 30 questions

Try 3 questions

1. In the relational model, what exactly is a "relation"?

  1. A set of tuples sharing the same attributes
  2. A file storing a table on disk
  3. A link connecting two separate tables
Show the answer

Answer: A set of tuples sharing the same attributes

A relation is the mathematical name for what we draw as a table: a set of tuples (rows) over a fixed list of attributes (columns).

2. Today, no two customers in the table happen to share a surname. Does that make surname a key?

  1. Yes, current uniqueness is enough
  2. Yes, if the surnames are also sorted
  3. No, a key must hold for all valid data
Show the answer

Answer: No, a key must hold for all valid data

A key is a constraint on every legal instance of the schema, not an accident of today's rows; the next customer could share a surname.

3. Codd paired the model with relational algebra. What does every relational algebra operation produce?

  1. A new relation
  2. A list of row positions
  3. A single number
Show the answer

Answer: A new relation

Relational algebra is closed: operations take relations and return relations, so their results can be fed into further operations and nested freely.

The rest of the quiz, a few questions at a time

BrainTok asks a few questions from quizzes like these before the apps you choose open, so your screen time turns into learning. For iPhone.

Join the beta

More Computer Science quizzes