xtdb

2025-08-23T17:45:55.963319Z

I have a question about data modeling in bi-temporality realm: How would you model a chat with time travel capabilities? If it's not clear I'm asking because chat in itself has a temporal component (conversation is temporal by nature). So I can either use write-time temporality, valid-time temporality or model my-own temporality on top (what I'd probably do in a traditional relational db). How would you model this kind of thing? P.S A chat with time travel - imagine a chat with undo/redo

refset 2025-08-24T18:16:39.484909Z

Great question :) It can be tempting to apply valid time in many scenarios but we can generally only recommend that it's appropriate when you're trying to model the notion of an upstream observation/action time, i.e. when there's been a delay Otherwise your mileage may vary, although you can certainly build some interesting things if you want to get creative

2025-08-24T18:19:00.248459Z

So that leaves using write-time and model some custom applicative time for messages (like you would in normal sql)

2025-08-24T18:19:49.370539Z

write-time feels like more for auditing than applicative usage...

refset 2025-08-24T18:35:50.332699Z

Auditing may be overly specific - I think of it more like "trying to make sense of what has happened" which covers all kinds of analysis

refset 2025-08-24T18:37:48.839279Z

System time (transaction time) is purely for system audit and read consistency