2

Firstly, I am not sure if this question is suitable for this community or not.

I am working on creating a report table that is given to the user after compiling some data. Now in the table cell, I show the data that is obtained after the data compilation is done.

There is one option in the report where when data is not returned (due to any reason)

  • I can either show null written in the cell, or
  • I can keep the cell empty

From the user's POV what should be kept, an empty cell or null written there.

Basically the user should get the data shown in cell but this is just in case if any issues occur.

Here are images for some details (the left cell shows null as value and right cell shows empty) -

Difference

2 Answers 2

2

This depends on what the problem is and how you want to communicate that with your users.

You might want to differentiate between different problems so that the user can understand if this is something temporary, something permanent, or something they can fix.

'Null' doesn't give the user any information at all and may even lead to them interpreting missing data as a zero value.

You'll need to identify the different problems that are likely to prevent you from getting the data to the user (database corruption, no data, connection error, etc) as well as identifying what each problem would mean to the user and what action they could take. This will help you decide how to mark those cells where a problem has occurred.

These criteria will all be specific to your data and your application of that data so it's impossible for us to come up with specific messages for you.

1

This sounds like a data problem, not just a UX issue. With any database fields it is usually better to have a 'sensible default' rather than a NULL.

Sometimes you have to have a NULL, but that should be the exception. Joe Celko has fairly sensible advice on this. Here's one example:

Quit worrying about the storage used by various products; they will make more and chepaer storage for you. The real question is how to use them in a data model. My heuristics are:

  1. Avoid them if you can. Use a dummy value and put it into a DEFAULT clause, if the domain of your column needs it.

  2. If you have a NULL, make usre it has one and only one meaning in that domain. Example: The ICD codes for disease use 000.000 for "Undiagnosed" and 999.999 for "Diagnosed, and we don't know what it is" for two kinds of missing data.

  3. Make sure the propagation property of NULLs makes sense in your data model. Otherwise, use COALESCE() to replace it with another value.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.