CompTIA Tech+ (FC0-U71)Data and Database FundamentalsMedium

A technician queries a Customers table and notices that the MiddleName field is empty for several customers who simply do not have a middle name on file. How should this value be represented in the database to indicate no data exists?

  1. AThe number zero
  2. BAn empty string of zero characters
  3. CNULL
  4. DThe word 'unknown'
Show answer & explanation

Correct answer: C. NULL

NULL represents the absence of a value in a database field, distinct from an empty string or zero, which are actual stored values. NULL indicates that no data was entered or that data is not applicable for that record.

Why the other options are wrong

  • A. Zero is an actual numeric value and would be misleading in a text-based field meant to indicate absence of data.
  • B. An empty string is a valid stored value of zero length, which is different from having no value at all.
  • D. Storing the literal word 'unknown' is a text value, not the database's built-in representation of missing data.

NULL Value

A special marker in a database used to indicate that a field's data is missing, unknown, or not applicable.

  • NULL is different from zero or an empty string, both of which are actual values.
  • Comparisons with NULL require special operators like IS NULL rather than equals.
  • Primary key columns typically cannot contain NULL values.

Memory trick: NULL is an empty mailbox, not a letter that says 'nothing.'

More Data and Database Fundamentals questions