IIFL Finance interview question

What is the difference between NoSQL and SQL databases? When would you use what?