datomic

Ask questions on the official Q&A site at https://ask.datomic.com!
2020-08-09T20:18:46.145200Z

When is it appropriate to namespace/qualify an datomic datom attribute instead of having it un namespaced/unqualified? E.g ( entity human/name drew) vs (entity race human)(entity name drew). I would say it depends on if you ever need to query those attributes separately.

favila 2020-08-09T21:20:42.146200Z

I would say, always qualify all idents

2020-08-09T22:06:05.149300Z

Interesting, but why? What if I want to query for everything by name? How would you do that if name isn't a free standing attribute?

Joe Lane 2020-08-09T22:40:45.149500Z

There are exceptions to the rule @drewverlee, for example, having an :ordinal attribute can be nice rather than :foo/ordinal, :bar/ordinal, etc. But it's also something to do very deliberately. What is your specific usecase?

favila 2020-08-09T23:03:25.149700Z

I might use a more generic namespace that could be shared by two cases, but I would always use a namespace

1👍1🎸