A quantity column must contain only nonnegative values. Which constraint can enforce this rule?
Relational Tables, Keys, and Constraints Online Quiz Questions
Use this free practice quiz with 20 questions to review Relational Tables, Keys, and Constraints, test your knowledge, and prepare for your next test or exam.
Select all statements that correctly describe the structure of a relational table.
- A
A row represents one record or instance.
- B
A cell represents an entire attribute shared by all records.
- C
A column describes an attribute.
- D
The schema defines a table’s columns.
An associative table can connect records from two tables to represent a many-to-many relationship.
- A
True
- B
False
What type of key is a minimal set of columns that uniquely identifies each row, before one is chosen as the table’s main identifier?
An integer data type provides a basic domain of .
Explain what a row, column, and cell represent in a relational table, and describe what the schema defines.
Which description defines a table’s primary key?
- A
A foreign key
- B
Any column containing text
- C
A candidate key chosen as the table’s main identifier
- D
A set of columns that may contain duplicate values
Select all statements that correctly describe associative tables and relationships between tables.
- A
An associative table can connect records from two tables.
- B
A combined primary key can limit each related pair to one row.
- C
A one-to-many relationship is represented by putting a foreign key on the “one” side.
- D
An associative table can represent a many-to-many relationship.
A UNIQUE constraint can disallow repeated values in a column.
- A
True
- B
False
What is the term for the value at the intersection of a row and a column?
A table that connects records from two other tables and can store facts about their connection is called an .
A table has a minimal column set that uniquely identifies every row. The database designer chooses this candidate key as the table’s main identifier. What is it called?
- A
A foreign key
- B
A primary key
- C
A candidate key
- D
A domain
An associative table connecting students and courses can represent a many-to-many relationship in which a student may take many courses and a course may have many students.
- A
True
- B
False
What is the term for the definition that specifies a table’s columns?
Which description defines a candidate key?
- A
A minimal set of columns that uniquely identifies each row
- B
Any column that contains a value in every row
- C
A column whose values refer to a key in another table
- D
The candidate key selected as the table’s main identifier
Each course belongs to one department, and a department may have multiple courses. According to this one-to-many design, which table holds the department foreign key?
What is the value at the intersection of a table row and a table column called?
- A
A schema
- B
A domain
- C
A cell
- D
A key
Which database constraint can enforce a condition such as requiring a quantity to be nonnegative?
- A
NOT NULL
- B
UNIQUE
- C
A data type
- D
CHECK
Which statement correctly describes the structure of a relational table?
- A
Columns represent records, rows represent attributes, and the schema changes whenever a row is added.
- B
Columns describe attributes and are defined in the schema; rows represent records and have no guaranteed order.
- C
Each row represents a column, and the schema specifies the order in which rows must appear.
- D
The schema stores the values at row-column intersections, while columns represent individual records.
A table has a candidate key that is selected as its main identifier. Which kind of key is it, and what must be true of its values?
- A
A foreign key, because it can refer to a key in another table.
- B
A candidate key, because every candidate key is automatically the table’s chosen main identifier.
- C
A primary key, because it is the candidate key chosen as the main identifier and must be unique and not null.
- D
A domain, because it is the set of valid values for an attribute.
Related study packs and tools
02 — Information and Representation
A progressive guide to how computers encode numbers, text, images, and sound as binary data, including the trade-offs and limits of digital representation.
2 Digital Logic
A 14-question medium-difficulty quiz on Boolean algebra, logic gates, truth tables, and combinational circuits.
03 — Python Programming Fundamentals
A focused set of flashcards covering Python variables, data types, expressions, control flow, functions, input, output, and common programming practices.
6 Computer Memory
Learn how computer memory stores and addresses information, how RAM and ROM differ, and how caches and the memory hierarchy balance speed, capacity, and cost.
07 Trees and Binary Search Trees
A progressive guide to tree structure, binary-tree traversals, binary search tree operations, deletion, balancing, and the way tree height determines time and space costs.
10 — Data, Systems, and Applications
A progression through how data is organized, searched, exposed through software interfaces, and managed through abstraction layers in modern computer systems.
Interrupts
Reviews how interrupts support event handling and multitasking, and how Linux system calls use the RISC-V `ecall` instruction and register conventions.
OS Processes
This quiz covers process management, context switching and scheduling, multitasking, traps and interrupts, and RISC-V privilege transitions.
Systemcalls
A quiz on operating-system system calls, including privileged-operation requests, process creation and execution with fork, exec, and waitpid, and signal handling.