Why interviewers ask this
Database choice is a frequent design topic.
How to approach it
Compare structure, schema flexibility, scaling and typical use cases without claiming one is always better.
Example answer
SQL databases store data in tables with fixed schemas and support joins and transactions well. NoSQL databases such as document stores offer flexible schemas and can scale horizontally. I would choose based on the data shape and consistency needs.
What a weak answer sounds like
NoSQL is faster so it is better.
It is vague, has no example and gives the interviewer nothing to remember.
A simple structure for your answer
- Describe how each stores data
- Compare schema, scaling and consistency
- Give a use case for each
- State that the right choice depends on the problem
Freshers and experienced candidates
Freshers should know the basic difference; experienced candidates should discuss indexing, transactions and scaling decisions.
Common mistake
Saying NoSQL is simply faster or better.
Self-check before the interview
Did you avoid saying one is always better?
Follow-up questions to expect
- When would you pick a relational database?
- What is a transaction?
- What is an index and when does it help?
How to practise
Prepare one example of a project where each type fits and explain your reasoning.
Use this as a pattern, not a script. Answer in your own words with your own examples.