MongoDB will throw an error if string indices are being too large.
For SQLite, you can indeed create a unique index on
VARCHAR(VERY_LONG) fields, and probably not throw an error; but are you really willing to accept the consequence?
Even for non-unique indices, probably not all indices helps querying performance that much?
Now that I looked it up, I don't even understand most of the terms.
- Bitmap index
- Dense index
- Sparse index
- Reverse index
- Primary index
- Secondary index
Now, I am curious on how to design a strongly typed database, with good querying performance, especially if flat and involves minimal joins?