79404034

Date: 2025-01-31 21:31:18
Score: 0.5
Natty:
Report link

This question reminds me about a dimensional model for data marts.

Let's say for simplicity that we use a relational database. In this case datetime and users are dimensions. And creation is a fact that joins these two dimensions. This is quite powerful schema that may provide answers to many questions like yours.

But if YAGNI and you need a projection specifically for this single question, then a single table with two columns, user_id and registered_at, would be enough. It is easy to iterate over all UserCreated (or UserRegistered?) events and to hydrate such projection.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Contains question mark (0.5):
Posted by: iTollu