I have some elements that I insert like this:
PutItem:
"TableName": "pets", "Item": { "petName": { "S": "Cat" }, "hairColor": { "S": "gray" }, "nickName": { "S": "Kitty" } }
Sometimes, however, pets do not have a nickname . I am new to dynamoDB, and I see that I can handle this in two ways (at least):
1)
"TableName": "pets", "Item": { "petName": { "S": "Cat" }, "hairColor": { "S": "gray" }, "nickName": { "NULL": "true" } }
2)
"TableName": "pets", "Item": { "petName": { "S": "Cat" }, "hairColor": { "S": "gray" } }
What is the difference for me (for example, when accessing data after that)? And what is the best practice?
source share