Making Sense Out of Datomic, The Revolutionary Non-NoSQL Database

I have finally managed to understand one of the most unusual databases of today, Datomic, and would like to share it with you. Thanks to Stuart Halloway and his workshop! Why? Why?!? As we shall see shortly, Datomic is very different from the traditional RDBMS databases as well as the various NoSQL databases. It evenContinue reading “Making Sense Out of Datomic, The Revolutionary Non-NoSQL Database”

Truncating UTF String to the given number of bytes while preserving its validity [for DB insert]

Often you need to insert a String from Java into a database column with a fixed length specified in bytes. Using string.substring(0, DB_FIELD_LENGTH); isn’t enough because it only cuts down the number of characters but in UTF-8 a single character may be represented by 1-4 bytes. But you cannot just turn the string into anContinue reading “Truncating UTF String to the given number of bytes while preserving its validity [for DB insert]”