I store the raw bytes, not even hex. Depends on the db you use if it supports this
Discussion
Using postgres
The npub data should be the same as a uuid. To your database it shouldnt make a difference but according to nip-1 of the protocol it should be HEX.
“pubkey": <32-bytes lowercase hex-encoded public key of the event creator>
https://github.com/nostr-protocol/nips/blob/master/01.md#events-and-signatures
I would imagine a native json db like mongodb or duckdb would have better performance than postgres
Hrmm I just grabbed the stack most familiar with. Node/express postgres.
Believe it or not I've actually never worked with MongoDB. I've done a lot of AWS dynamodb development though are they similar?
Yeah dynamodb is similar to mongodb. Honestly, if you have experience with dynamodb then you should be good.
I find dynamo quirky and a pain to use their api/ db interface
I didn't tag you above because I assumed you were running around a fjord 🥹
Yeah go enjoy Oslo nostr:npub1xtscya34g58tk0z605fvr788k263gsu6cy9x0mhnm87echrgufzsevkk5s
Filesystems support raw bytes.