What are the primary differences between SQL and NoSQL databases, and how do you choose between them for a project?