How to strip null fields for gdpr data minimization
- Step 1Review which optional fields may be null — Identify the optional fields in the data model that should only be stored if the user provided the data: middleName, phoneNumber, dateOfBirth, marketingPreference. These are candidates for stripping.
- Step 2Strip null fields from a sample record — Paste a record with optional null fields and strip them. Verify the output contains only the fields with actual data.
- Step 3Implement in the data write path — Add null stripping to the data persistence layer — before Prisma create(), before MongoDB insertOne(), before SQL INSERT. The record saved to the database contains only the data that was provided.
- Step 4Document the sparse storage pattern — Document in the data model that optional fields are stored sparsely — only present if collected. This avoids confusion when querying: a missing field means not collected, not just null.
Frequently asked questions
Is there a difference between storing null and not storing a field for GDPR purposes?+
Both store the field name in the database schema, but only storing a value (null or non-null) for a specific record is the minimization concern. MongoDB stores documents sparsely — a null field and an absent field are different in practice. For GDPR minimization, absent is better than null because no value is committed to storage for that data point.
How does null stripping interact with database indexing?+
In MongoDB, a sparse index does not include documents where the indexed field is absent — improving index size and performance for optional fields. Stripping null fields before insertion enables sparse indexes to work as intended. For SQL databases, consider nullable columns for optional fields and only INSERT the field name when the value is present.
Is the personal data transmitted to JAD Apps?+
No. Null stripping runs entirely in your browser. Records with personal data are never transmitted to JAD Apps servers.
Privacy first
Conversion runs locally in your browser. No file is uploaded — only metadata counters are saved for signed-in dashboard stats.