What is a candidate key?
A candidate key is a minimal set of one or more columns that uniquely identifies every row.
Study 2 Keys and Relationships with 12 free online flashcards. Review key terms, definitions, and concepts with this interactive flashcard deck.
What is a candidate key?
A candidate key is a minimal set of one or more columns that uniquely identifies every row.
What is a table’s primary key?
A primary key is the candidate key selected as the table’s main identifier. It must be unique and non-null, and a table can have at most one.
What is a composite key?
A composite key uses multiple columns together as a key.
How can a table enforce a candidate key that is not its primary key?
Other candidate keys can be enforced with UNIQUE constraints.
What key can a foreign key refer to?
A foreign key refers to a primary key or another unique key in a different table.
What does referential integrity require?
Referential integrity requires each non-null foreign-key value to match an existing value in the referenced key.
What must match between foreign-key columns and referenced columns?
The referencing and referenced columns must have the same number of columns and compatible data types.
How does foreign-key nullability represent an optional relationship?
A nullable foreign key allows an optional relationship. Add NOT NULL when every row must be linked.
How does a foreign key represent a one-to-many relationship?
In a one-to-many relationship, one parent can be linked to many child rows, while each child points to one parent.
How can a foreign key enforce a one-to-one relationship?
Make the foreign key UNIQUE so that no two rows can refer to the same parent.
How is a many-to-many relationship usually represented?
A many-to-many relationship is usually represented by a junction table with foreign keys to both related tables.
How can an enrollment table prevent duplicate student-course pairs?
A composite primary key on the two foreign keys can prevent duplicate pairs, so the same student-course enrollment cannot be entered twice.
A 14-question medium-difficulty quiz on Boolean algebra, logic gates, truth tables, and combinational circuits.
A focused set of flashcards covering Python variables, data types, expressions, control flow, functions, input, output, and common programming practices.
A structured guide to the main data structures, their operations, efficiency trade-offs, representations, and practical selection criteria.
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.
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.
A focused review of propositional logic, quantifiers, sets, relations, functions, and foundational proof methods in discrete mathematics for computer science.
Reviews how interrupts support event handling and multitasking, and how Linux system calls use the RISC-V `ecall` instruction and register conventions.
This quiz covers process management, context switching and scheduling, multitasking, traps and interrupts, and RISC-V privilege transitions.
A quiz on operating-system system calls, including privileged-operation requests, process creation and execution with fork, exec, and waitpid, and signal handling.