3 ms·
So that you can store/retrieve data without knowing the schema. Oh but you have to know the schema right? Yes, some other part of the application knows the sch
by raverbashing 14y ago
So that you can store/retrieve data without knowing the schema.
Oh but you have to know the schema right? Yes, some other part of the application knows the schema, but this part doesn't have authority over the DB. Also, the schema may be data as well.
NoSQL reduces the work needed for that.
- vasyainv 14y agoPerhaps, but can't you just organize your objects by having a table for each type and adding a column as needed? it doesn't sound like such a big deal
- raverbashing 14y agoLooks like fun But why would I waste developer time doing that if I can only do db.table.insert(obj) - in MongoDB for example (obj is a JS object) Also, finding all objects with a field named 'field1' and value '3' is slower if you do that in a relational DB (and that's the simplest case)
- mayank 14y agoWhy on earth would that be slower in a relational db? That makes no sense, since indices in both nosql and relational dbs are variants of b-trees.
- raverbashing 14y agoWell, it's slower because of a join that exists in SQL (the relationship between your 'field/value' table and the entry. Apart from that, as you said indexes are similar. The fun thing about NoSQL skeptics is how they think of only the current scenarios they work with, and they won't believe you until they get burned by it. So be it.
- deleted 14y ago[deleted]
- vasyainv 14y agoWell, because presumably SQL databases have features you don't get with noqsl solutions.