Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 858313
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T08:31:41+00:00 2026-05-15T08:31:41+00:00

Some while ago, I’ve been reading through the book SQL and Relational Theory by

  • 0

Some while ago, I’ve been reading through the book SQL and Relational Theory by C. J. Date. The author is well-known for criticising SQL’s three-valued logic (3VL).1)

The author makes some strong points about why 3VL should be avoided in SQL, however he doesn’t outline how a database model would look like if nullable columns weren’t allowed. I’ve thought on this for a bit and have come up with the following solutions. If I missed other design options, I would like to hear about them!

1) Date’s critique of SQL’s 3VL has in turn been criticized too: see this paper by Claude Rubinson (includes the original critique by C. J. Date).


Example table:

As an example, take the following table where we have one nullable column (DateOfBirth):

#  +-------------------------------------------+
#  |                   People                  |
#  +------------+--------------+---------------+
#  |  PersonID  |  Name        |  DateOfBirth  |
#  +============+--------------+---------------+
#  |  1         |  Banana Man  |  NULL         |
#  +------------+--------------+---------------+

Option 1: Emulating NULL through a flag and a default value:

Instead of making the column nullable, any default value is specified (e.g. 1900-01-01). An additional BOOLEAN column will specify whether the value in DateOfBirth should simply be ignored or whether it actually contains data.

#  +------------------------------------------------------------------+
#  |                              People'                             |
#  +------------+--------------+----------------------+---------------+
#  |  PersonID  |  Name        |  IsDateOfBirthKnown  |  DateOfBirth  |
#  +============+--------------+----------------------+---------------+
#  |  1         |  Banana Man  |  FALSE               |  1900-01-01   |
#  +------------+--------------+----------------------+---------------+

Option 2: Turning a nullable column into a separate table:

The nullable column is replaced by a new table (DatesOfBirth). If a record doesn’t have data for that column, there won’t be a record in the new table:

#  +---------------------------+ 1    0..1 +----------------------------+
#  |         People'           | <-------> |         DatesOfBirth       |
#  +------------+--------------+           +------------+---------------+
#  |  PersonID  |  Name        |           |  PersonID  |  DateOfBirth  |
#  +============+--------------+           +============+---------------+
#  |  1         |  Banana Man  |
#  +------------+--------------+

While this seems like the better solution, this would possibly result in many tables that need to be joined for a single query. Since OUTER JOINs won’t be allowed (because they would introduce NULL into the result set), all the necessary data could possibly no longer be fetched with just a single query as before.


Question:
Are there any other options for eliminating NULL (and if so, what are they)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T08:31:41+00:00Added an answer on May 15, 2026 at 8:31 am

    I saw Date’s colleague Hugh Darwen discuss this issue in an excellent presentation “How To Handle Missing Information Without Using NULL”, which is available on the Third Manifesto website.

    His solution is a variant on your second approach. It’s sixth normal form, with tables to hold both Date of Birth and identifiers where it is unknown:

    #  +-----------------------------+ 1    0..1 +----------------------------+
    #  |         People'             | <-------> |         DatesOfBirth       |
    #  +------------+----------------+           +------------+---------------+
    #  |  PersonID  |  Name          |           |  PersonID  |  DateOfBirth  |
    #  +============+----------------+           +============+---------------+
    #  |  1         |  Banana Man    |           ! 2          | 20-MAY-1991   |
    #  |  2         |  Satsuma Girl  |           +------------+---------------+
    #  +------------+----------------+
    #                                  1    0..1 +------------+
    #                                  <-------> | DobUnknown |
    #                                            +------------+
    #                                            |  PersonID  |
    #                                            +============+
    #                                            | 1          |
    #                                            +------------+
    

    Selecting from People then requires joining all three tables, including boilerplate to indicate the unknown Dates Of Birth.

    Of course, this is somewhat theoretical. The state of SQL these days is still not sufficiently advanced to handle all this. Hugh’s presentation covers these shortcomings. One thing he mentions is not entirely correct: some flavours of SQL do support multiple assignment – for instance Oracle’s INSERT ALL syntax.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm going over some SQL I wrote a while ago that joins 4 tables
I remember reading a while ago that in some cases leaving out end tags
A while ago I did some work in Qt for C++; now I'm working
A while ago, I was writing some code, but accidentally deleted some good code
It came to my attention a while ago that some people were posting images
This question was asked quite some time ago, and while it covers possible solutions
Let we explain what I mean. Some time ago, while writing a program in
I made a while ago some code that adds an object to my table
A while ago I remember seeing a constant of some kind that defined the
A while ago, I wrote some Word interop examples in Visual Studio beta 1,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.