Search code examples
titankey-value-storenosql

key/value stores naming sizes


Coming from a RDBMS world I am used to think about the sizing of the value of a column and not the name itself. Seems like in various nosql databases that can have any key/value , the naming of the key is important because it is written every single time. Does it make sense to name the keys with 3 letters max and make a normal clientID key name as CID etc? Is it standard practice?

P.S I am using titandb


Solution

  • I would not call having overly abbreviated keys "standard practice". Be as descriptive as you need to be to name your keys. When you have hundreds or thousands of keys you'll be happy that you did. Even if the price of having a three letter key added up to some measure of performance improvement or space savings, I don't think that's worth the cost you will pay in maintaining your software over time. In other words, keeping your code readable is likely more valuable than saving a few bytes.