nerdexam
CompTIA

FC0-U61 · Question #903

A database administrator has created a primary table and must ensure the date column in the table only accepts date values. Which of the following does the administrator need to set?

The correct answer is C. Constrain!. To ensure a database column only accepts specific data types like dates, the administrator must implement a database constraint.

Database Fundamentals

Question

A database administrator has created a primary table and must ensure the date column in the table only accepts date values. Which of the following does the administrator need to set?

Options

  • ASchema
  • BPrimary key
  • CConstrain!
  • DPermissions

How the community answered

(27 responses)
  • A
    4% (1)
  • B
    4% (1)
  • C
    93% (25)

Why each option

To ensure a database column only accepts specific data types like dates, the administrator must implement a database constraint.

ASchema

A schema defines the overall structure of the database, tables, and relationships, but 'setting a schema' is not the specific action to enforce data type validation on a column.

BPrimary key

A primary key uniquely identifies rows and enforces non-nullability, but it does not specifically restrict a column to only accept date values.

CConstrain!Correct

To restrict a column to only accept date values, the database administrator needs to set a constraint. This can involve defining the column with a DATE data type, which inherently enforces date-only values, or using a CHECK constraint for more complex validation rules.

DPermissions

Permissions control user access and actions within the database, but they do not enforce data type or value restrictions on columns.

Concept tested: Database constraints for data integrity

Source: https://learn.microsoft.com/en-us/sql/relational-databases/tables/primary-and-foreign-key-constraints

Topics

#database constraints#data integrity#data types

Community Discussion

No community discussion yet for this question.

Full FC0-U61 Practice