3 ms·
I don’t see how you’d have a number instead of a spring in a document in a typed language. Do you just directly dump user supplied data in your database without
by doteka 6y ago
I don’t see how you’d have a number instead of a spring in a document in a typed language. Do you just directly dump user supplied data in your database without parsing/processing it? Otherwise, how is this not caught when it enters your system?
- loopz 6y agoIt is caught by the schema and never stored in the first place. Or you can solve it for every column/field in your system manually, and probably introduce subtle bugs and inconsistencies along the way. I'm for schemas, but not necessarily RDBMS for everything.
- john-shaffer 6y agoMost document databases have JSON editors, which are very useful at times but don't have any schema checks. By "typed language" I suppose you mean "statically typed language". This isn't relevant because A) JSON types exist and B) I've never had a problem with unexpected types from user data in a dynamic language, not even in PHP. > Otherwise, how is this not caught when it enters your system? It should be caught, and it's very important that it be caught all of the time and not have any issues due to bugs or version mismatches. That's why the schema should live in the DB.