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 6556789
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:59:22+00:00 2026-05-25T12:59:22+00:00

Here is my problem: Where I work, I need to run reports on a

  • 0

Here is my problem:

Where I work, I need to run reports on a very large database. I’m using basic SQL queries in PHP to filter for exactly what I want. Every so often I’ll get groups in my reports that do not meet the criteria of my search query.

I noticed that all of the “stragglers” that appear in my reports seemed to have NULL values in certain fields, consistently.

Looking at the database structure, I find that these NULL values in the database have a NOT NULL flag set on them.

It turns out that these are actually not NULL values and instead empty string values or $value = ”

In my past experience, when I was starting out I would make this mistake a lot, setting something = ” instead of making it NULL.

I’ve asked the DBA if he can think of any legitimate reason why these are set this way ( there are 300,000 some odd records that are like this ) and he had no clue.

I’m thinking it could be another programmers mistake or someone attempting to avoid not being able to insert the record due to the “NOT NULL” flag set on that specific field.

So I’m scratching my head over here trying to find a legitimate reason for these to exist, other than my own suspicions that the database was not designed for these 2 types of records: records with this value and records without this value.

What are your thoughts?

  • 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-25T12:59:23+00:00Added an answer on May 25, 2026 at 12:59 pm

    The use of NULL as a value in database has its critics, I’d like to refer to the Wikipedia article on NULL for an explanation of some of the oddities NULL may introduce in your queries.

    So probably the database architect wasn’t a fan of NULLs, maybe after reading “the Third Manifesto”. This PDF (by one of the authors of the Third Manifesto) can help you understand the problem and show you how to manage the special case of missing values can be handled.

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

Sidebar

Related Questions

Here's a problem I've been trying to solve at work. I'm not a database
I've got a problem here with an MSI deployment that I'm working on (using
I need to run Dos commands within a class. My problem is that the
I've run into a small problem here. I wrote the Tortoise and Hare cycle
Here is the problem... I'm writing very small plugin for Blender, I have 10
I'm having some problems with getting the .getruntime.exec() to work properly. Here is the
Maddening problem here. When my page loads: <body onload=getClientDateTime();> It runs this function: document.getElementById('ClientDateTime').value=hello
What is the problem here? (Besides having redundant code). $.getJSON works as expected. However
I have a problem here. My Zend_Forms do not render in view script. Via
Just a small SVN problem here. I setup my own SVN server Setting up

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.