How do you design a schema for auditability and compliance?
Define authoritative records, immutable audit events where required, actor and timestamp semantics, retention, access controls, data minimization, and expo
The question library
Explore practical questions, clear explanations, and code examples across developer technologies.
Showing 3277–3288 of 3610 questions
Define authoritative records, immutable audit events where required, actor and timestamp semantics, retention, access controls, data minimization, and expo
Represent payment attempts and state transitions explicitly rather than a single ambiguous boolean. Use unique external references, idempotency keys, amoun
Separate on-hand, reserved, and available quantities or use reservation records with expiry. Enforce nonnegative invariants using atomic updates and transa
A soft-delete strategy must decide whether deleted rows still reserve unique values. Some engines support filtered/partial unique indexes; other designs us
Effective-dated records store valid-from and valid-to boundaries to represent when a fact applies. Prevent overlapping intervals when the domain requires a
Use transactions and engine-supported exclusion constraints, locking, or carefully designed validation to prevent overlapping ranges for the same entity. A
Model resources, bookings, time ranges, status, and customer references. Prevent double-booking using transactions, suitable locks or exclusion constraints
Keep order-line snapshots of item name, unit price, tax/discount, and currency as needed. Product catalog changes should not rewrite what the customer purc
Soft delete supports logical removal, while archival moves older data to a lower-cost or separate store. Define how queries, legal holds, restore, and purg
Choose which events require synchronous durable auditing, minimize payload size, index only query-critical fields, and consider partitioning or asynchronou
Compare latency and workload changes, inspect waits, blocking, deadlocks, CPU/I/O, execution plans, statistics, connection saturation, and recent deploymen
In SQL Server, parameter sniffing is when a cached plan is compiled using parameter values that may not represent later executions. It can cause uneven per