Reputation: 883
If I had to explain SQL & NOSQL to a college student within 1 minute :
You're familiar with an Excel spreadsheet, right ? That is SQL:
id, name, age, weight
1, Adam, 20, 150
2, Bob, 30, 160
...
Now imagine if you didn't know the column names up-front, and wanted to flexible in adding new ones later. That is NOSQL :
id, column, value
1, name, Adam
1, age, 20
1, weight, 150
2, name, Bob
2, age, 30,
2, weight, 160
2, gender, Male
...
In technical jargon - they are PIVOTs of each other.
For a query like :
select * from people where age > 20
SQL will generally run a single server, with all data in one database, and use an index on age column to filter data.
NOSQL will generally run in a cluster in parallel, with data spread across multiple servers, where each one filters its local age data (MAP), and then a central server combines results (REDUCE)
Is that a good high-level explanation ?
Upvotes: 1
Views: 582
Reputation: 283
If I had to explain this topic like you're five it'd go something like this: I'd sit you on the table and get a shape sorter toy.
Then I'd get rid of the surface with the shape holes so that it would be just a plastic box with a large opening (the plastic with the shape holes is gone).
Upvotes: 2