Fork me on GitHub
#datomic
<
2020-03-31
>
Braden Shepherdson21:03:37

does datomic limit the maximum size of :db.type/string values? what about bytes?

favila21:03:07

on-prem: no, unless it’s a string in a tuple, then it’s 256 chars; cloud: strings are 4096 chars outside tuples and 256 chars inside, and it doesn’t have bytes.

👍 4
favila21:03:16

these are documented on the on-prem and cloud schema pages

Braden Shepherdson21:03:03

I realize it becomes inefficient, and it's not really recommended to store a blog post in a string value, but I'm wondering if there's a formal limit.

John Leidegren09:04:02

I could be wrong about this but the idea is to store structure, so you would store maybe each paragraph as a string and not actually whe whole body? This does create another problem where order is important. At which point, and depending on what you want to do, you might consider actually storing a linked data structure. Where paragraphs have next pointers. You use pull with recursive patterns to bring in the model. Though, it's a bit odd maybe because you get a hierarchical model back where you might have expected a list of paragraphs. I'm just thinking out loud here, but I think this is kinda what Datomic wants you to do... or at least I get that feeling from now and then that you should fully embrace the graph like nature of Datomic.