119k views
5 votes
Which of these constraints uses multiple fields as a primary key?

A. foreign key
B. unique
C. composite key
D. check

1 Answer

3 votes

Final answer:

A composite key is the correct answer, as it uses multiple fields to uniquely identify a record in a database table.option c.

Step-by-step explanation:

The constraint that uses multiple fields as a primary key is C. composite key. A composite key is a type of database key that consists of two or more columns which together uniquely identify a record in a table. It is used when no single column can serve as a unique identifier and a combination of columns is required to guarantee row uniqueness.

On the other hand, A. foreign key refers to a column or group of columns in a table that uniquely identifies a row in another table, typically forming a link between the two tables. B. unique is a constraint that ensures all values in a column or a set of columns are distinct. Lastly, D. check is a constraint that limits the values that can be placed in a column based on a Boolean expression.

The constraint that uses multiple fields as a primary key is called a composite key.

A composite key is a key that is composed of two or more attributes, or fields, that together uniquely identify a record in a database table. In other words, it uses a combination of multiple fields to create a unique identifier for each record.

For example, in a database table for student records, a composite key could be a combination of the student's first name, last name, and student ID. This combination of fields would ensure that each student record is unique and can be easily identified.

User Schaul
by
8.0k points