4 ms·
He said can it guarantee that the field "length" will always be a number and not..eg a string, or a list, or an object.
by zepolen 9y ago
He said can it guarantee that the field "length" will always be a number and not..eg a string, or a list, or an object.
- threeseed 9y agoWhy would it guarantee that ? It's a schema less database. It's not supposed to do that. And my point is that if you query a single document and the field is a number then it will be returned as a number i.e. it physically stores and understands numbers.
- zepolen 9y agoElasticsearch is schemaless as well, however it can guarantee that a field is a number once used.
- threeseed 9y agoElasticsearch is not schemaless. It typically requires you to define a mapping (schema) upfront. You can set it to automatically infer the mapping based on the available data but this does not make it truly schemaless. MongoDB allows a free form schema for every document. You're again comparing apples and oranges.
- metheus 9y agoJust to be clear, a better term would be "dynamic schema". You can ask for data type validation since 3.2.
- manigandham 9y agoSchemaless by definition means this is not guaranteed. The same property name can hold different types of data from one object to the next. Several other key-value/wide-column have the same exact setup.