2 ms·
First, it's a document store so you can store the way the form is constructed with it (i.e. order of elements, etc). Second, in Dynamo you could chose the abse
by MBCook 10y ago
First, it's a document store so you can store the way the form is constructed with it (i.e. order of elements, etc).
Second, in Dynamo you could chose the absence of a key to represent "never got here" and a key with a null value to represent "they left this blank". You don't need an empty string.
- Dylan16807 10y agoSo using null to mean the opposite of what it normally means? I would recommend against anyone using that workaround.
- MBCook 10y agoThat depends on whether you see null as a marker of not having data or a marker of not knowing if there is data.
- Dylan16807 10y agoBoth of those are data unknown, and both would normally be null. You don't distinguish between known unknowns and unknown unknowns at the database level. When you say "The user submitted an empty form field as their answer", you do have data. It's weird to use null for that. Since you can leave a key absent in DynamoDB, it basically has two ways to say "data unknown" and no way to say "knowingly left blank". You can repurpose null as you suggested, and it will work fine in isolation, but it will massively violate the principle of least surprise and could lead to painful bugs.