Explain the differences between SQL and NoSQL databases and how you choose between them for a project.