All 119 questions
How do relational and NoSQL databases differ, and when would you choose one over the other?
Asked in 25 of 612 interviews · last asked Oct 23 · Concept · Mid-level
Show answer
Relational databases, like SQL Server, store data in tables with defined schemas; NoSQL databases use document, key-value, or other models. MongoDB stores documents, often with flexible fields. Choose relational databases for joins, constraints, and transactions across related data. Choose NoSQL when its data model and scaling options fit your workload, while checking transaction and consistency support.
- Relational databases can enforce relationships through foreign keys and combine related data through joins.
- NoSQL schema flexibility varies; MongoDB can enforce document validation rules.
- MongoDB supports transactions across documents; compare transaction scope, guarantees, and costs.
- Both types can scale; choose based on access patterns, consistency needs, and operational complexity.
What the interviewer checks: The interviewer checks whether you can choose a database based on data structure, relationships, and reliability needs.
Common mistake (in 3 of 9 reviewed answers): Many answers forget that NoSQL includes several data models, so distinguish them rather than treating NoSQL as one design.
Other ways it was asked
- “What is the difference between SQL and NoSQL databases?”
- “What is the key difference between SQL and NoSQL databases?”
- “What is the main difference between a SQL and NoSQL database?”
What is SQL?
Asked in 10 of 612 interviews · last asked Oct 17 · Concept · Junior
Show answer
SQL stands for Structured Query Language. It is used to work with relational databases. You use it to read, add, change, and delete data, and to create or change database tables.
- SQL describes what data you want, rather than each step to get it.
- Common commands include SELECT, INSERT, UPDATE, and DELETE.
- Databases such as PostgreSQL, MySQL, and SQL Server have differences in SQL syntax and features.
What the interviewer checks: The interviewer is checking whether you know what SQL is and what it is used for.
Other ways it was asked
- “What is SQL, and what is it used for?”
- “What does SQL stand for?”
What is the difference between DELETE, TRUNCATE, and DROP?
Asked in 8 of 612 interviews · last asked Oct 16 · Concept · Junior
Show answer
DELETE removes rows from a table, using WHERE to choose rows or removing all rows without it. TRUNCATE removes all rows but keeps the table structure. DROP removes the table itself, including its data and definition.
- DELETE is DML; TRUNCATE and DROP are generally classified as DDL.
- TRUNCATE does not accept WHERE and is usually faster than deleting all rows.
- Foreign key constraints can prevent these operations.
- Rollback support, trigger behavior, and identity resets depend on the database and command.
What the interviewer checks: The interviewer checks whether you can choose the right command and understand what it removes.
Other ways it was asked
- “Could you explain the difference between DELETE, TRUNCATE, and DROP in SQL?”
- “What is the difference between TRUNCATE and DELETE?”
- “What is the difference between DROP and TRUNCATE?”
What are the main types of SQL commands, and how do DDL and DML differ?
Asked in 8 of 612 interviews · last asked Oct 1 · Concept · Junior
Show answer
The main groups are DDL (Data Definition Language), DML (Data Manipulation Language), DQL (Data Query Language), DCL (Data Control Language), and TCL (Transaction Control Language). DDL defines or changes database structures, while DML inserts, updates, or deletes data. SELECT is often called DQL, but some classifications include it in DML.
- DDL commands include CREATE, ALTER, and DROP.
- DML commands include INSERT, UPDATE, and DELETE.
- DCL controls permissions with commands such as GRANT and REVOKE.
- TCL manages transactions with commands such as COMMIT and ROLLBACK.
What the interviewer checks: The interviewer checks whether you can distinguish structure changes, data changes, queries, permissions, and transaction control.
Other ways it was asked
- “What is the difference between DML and DDL?”
- “Can you explain the difference between DML and DDL?”
- “What do DDL and DML mean?”
What is a database?
Asked in 5 of 612 interviews · last asked Oct 4 · Concept · Junior
What is the difference between OLTP and OLAP systems?
Asked in 4 of 612 interviews · last asked Sep 18 · Concept · Junior
Other ways it was asked
- “What is the difference between OLAP and OLTP?”
- “What are OLAP and OLTP systems, and how do they differ?”
- “What's the difference between OLAP and OLTP?”
How do you approach writing SQL queries?
Asked in 3 of 612 interviews · last asked Sep 8 · Tooling · Mid-level
Other ways it was asked
- “How do you approach writing and optimizing complex SQL queries?”
- “What are the key concepts involved in writing SQL queries?”
How does PostgreSQL differ from MySQL, and how is SQL related to both?
Asked in 2 of 612 interviews · last asked Aug 14 · Concept · Junior
Other ways it was asked
- “What's the difference between SQL and PostgreSQL?”
What is a relational database?
Asked in 2 of 612 interviews · last asked Oct 21 · Concept · Junior
What is PostgreSQL?
Asked in 2 of 612 interviews · last asked Aug 14 · Concept · Junior
What are the different types of databases?
Asked in 2 of 612 interviews · last asked Oct 15 · Concept · Junior
Other ways it was asked
- “What are the different types of database relationships?”
What does CRUD mean in DBMS?
Asked in 2 of 612 interviews · last asked Sep 7 · Concept · Junior
Other ways it was asked
- “What are CRUD operations?”
For a system like Instagram, would you choose a NoSQL or relational database? Give specific examples and explain why.
Asked once · last asked May 11 · Design · Senior
Other ways it was asked
- “If you chose a NoSQL database for a system like Instagram, which one would you select, such as MongoDB, and why?”
For a workload that retrieves complete rows, would you recommend a row-based RDBMS?
Asked once · last asked Jul 29 · Scenario · Mid-level
Other ways it was asked
- “For a workload that retrieves complete rows, would you recommend a row-based RDBMS such as MySQL or a columnar database?”
For an application storing videos and JSON-based metadata, why might PostgreSQL not be the best choice?
Asked once · last asked Oct 19 · Concept · Senior
How would you handle an insert that should update an existing row when a conflict occurs in PostgreSQL?
Asked once · last asked Jan 28 · Tooling · Mid-level
What differentiates Snowflake from a traditional SQL Server or similar system?
Asked once · last asked Feb 4 · Concept · Mid-level
What factors should guide the choice of a database for a service?
Asked once · last asked Feb 23 · Scenario · Mid-level
When might MongoDB be a better fit than a relational database?
Asked once · last asked Feb 23 · Concept · Mid-level
Which database would you choose for a chat service that stores messages, photos, and other attachments: Redis, MongoDB, or PostgreSQL?
Asked once · last asked Feb 23 · Design · Mid-level
How should you store monetary values, such as salaries, to avoid precision errors?
Asked once · last asked Feb 23 · Concept · Mid-level
Why would you choose MySQL and Docker instead of SQLite for a software project?
Asked once · last asked Apr 10 · Scenario · Junior
If you encounter incorrect data, what would you do in that scenario, and how would you handle it using SQL?
Asked once · last asked Apr 14 · Scenario · Mid-level
Would data access and update frequency affect your database choice, or would you still choose a relational database?
Asked once · last asked Apr 15 · Scenario · Mid-level
Are SQL string comparisons case-sensitive? Would comparing a value with "yes" produce the same result as comparing it with "YES"?
Asked once · last asked Apr 15 · Concept · Mid-level
If you were building a chat application, which type of database would you choose?
Asked once · last asked Apr 23 · Scenario · Mid-level
What advantages does Elasticsearch offer over PostgreSQL or MongoDB for search?
Asked once · last asked Apr 27 · Concept · Senior
How do you view PostgreSQL compared with other databases, and which database do you prefer for real-time processing, and why?
Asked once · last asked May 18 · Design · Senior
How is PostgreSQL's architecture structured?
Asked once · last asked May 29 · Concept · Junior
Other ways it was asked
- “What is PostgreSQL architecture?”
How does XML differ from a relational database such as MySQL or PostgreSQL?
Asked once · last asked Jun 9 · Concept · Junior
How can geospatial data be stored, and what kind of database would you use for graph data?
Asked once · last asked Jun 11 · Concept · Mid-level
What factors would you consider when choosing between SQL Server and PostgreSQL for short-term and long-term rental data?
Asked once · last asked Jun 18 · Scenario · Senior
In Oracle, what's the practical difference between DELETE and TRUNCATE, and when would you choose one over the other in an ETL load pattern?
Asked once · last asked Jun 25 · Concept · Mid-level
In Oracle, how do DELETE and TRUNCATE differ in terms of undo/redo logging and trigger behavior?
Asked once · last asked Jun 25 · Concept · Senior
What is the correct order of clauses in an SQL query, and why does it matter?
Asked once · last asked Jun 30 · Concept · Junior
When building a new product, what type of database would you choose?
Asked once · last asked Jul 16 · Scenario · Mid-level
Given a product table with a product name column containing "Apple," how would you update that value to "Grapes"?
Asked once · last asked Jul 16 · Write code · Junior
How do you perform UPDATE statements or mass updates in SQL?
Asked once · last asked Jul 16 · Concept · Junior
Given an employee table with first name, last name, date of birth, and salary columns, write a SQL query to return the first three characters of each first name.
Asked once · last asked Jul 16 · Write code · Junior
What is the difference between PostgreSQL and Elasticsearch?
Asked once · last asked Jul 27 · Concept · Mid-level
For a transactional workload, what kind of database would you recommend?
Asked once · last asked Jul 27 · Scenario · Mid-level
What is the most common reason for picking a NoSQL database over a relational one?
Asked once · last asked Jul 29 · Concept · Junior
When would you store data in a row-based relational database versus a columnar database?
Asked once · last asked Jul 29 · Concept · Mid-level
Other ways it was asked
- “When would you store data in a rule-based RDBMS style versus a columnar database?”
How would you explain the significance of using a semantic search approach like pgvector within a database compared to traditional keyword search?
Asked once · last asked Jul 30 · Concept · Mid-level
If you had to decide between continuing to optimize vector-based semantic search and improving traditional relational database features for your application, what factors would guide your decision?
Asked once · last asked Jul 30 · Scenario · Senior
What is the difference between a vector database and a relational database?
Asked once · last asked Aug 7 · Concept · Junior
What is the difference between pooled tables and cluster tables?
Asked once · last asked Aug 7 · Concept · Junior
What data type do you like to use to represent money in PostgreSQL?
Asked once · last asked Aug 12 · Concept · Mid-level
After a SQL query runs successfully, how do you validate its results?
Asked once · last asked Aug 12 · Scenario · Mid-level
How would you detect off-by-one errors when validating query results?
Asked once · last asked Aug 12 · Scenario · Mid-level
What is the difference between Core Data and a database?
Asked once · last asked Aug 17 · Concept · Mid-level
Can you write the Cypher equivalent of a simple SQL query like SELECT * FROM table WHERE name = 'example'?
Asked once · last asked Aug 20 · Write code · Mid-level
Other ways it was asked
- “Can you write the Cypher equivalent of a simple SQL query like SELECT * FROM table WHERE name = 'Harish'?”
How will you use a CASE WHEN statement to fix the incorrect gender assignments?
Asked once · last asked Aug 20 · Write code · Mid-level
Can you explain why ClickHouse is good for analytics, and how it differs from Postgres?
Asked once · last asked Sep 2 · Concept · Mid-level
Can you explain the differences between SQLite, MySQL, and PostgreSQL?
Asked once · last asked Sep 8 · Concept · Junior
Write a SELECT query that retrieves 10 fields from a single table without using any joins.
Asked once · last asked Sep 8 · Write code · Junior
Will filtering dates stored as character strings always produce the expected results in SQL?
Asked once · last asked Sep 9 · Concept · Mid-level
How different are DB2, MongoDB, and Oracle?
Asked once · last asked Sep 9 · Concept · Mid-level
For a simple application that may not need relational data, how would you choose between MongoDB, PostgreSQL, and Oracle?
Asked once · last asked Sep 9 · Scenario · Mid-level
When choosing between a graph database and a traditional database, what considerations would you keep in mind?
Asked once · last asked Sep 10 · Design · Senior
In MySQL, when would you choose VARCHAR, CHAR, or TEXT for a column, and how does that choice affect indexing and performance?
Asked once · last asked Sep 10 · Concept · Mid-level
Other ways it was asked
- “In MySQL, when would you choose VARCHAR versus CHAR versus TEXT for a column? And how does that choice affect indexing and performance?”
Why would you use MongoDB over MySQL?
Asked once · last asked Sep 17 · Concept · Mid-level
For an e-commerce application, what database would you choose, and what would you choose for a banking application?
Asked once · last asked Sep 21 · Design · Senior
Write a SQL query to alter a column's data type from integer to decimal.
Asked once · last asked Sep 25 · Write code · Junior
How would you replace NULL values in a student table's age column with zero in SQL?
Asked once · last asked Sep 30 · Write code · Junior
What capabilities does Elasticsearch provide for full-text search that SQL Server or other databases may not provide as effectively?
Asked once · last asked Oct 2 · Concept · Senior
What is the difference between a database and a data warehouse?
Asked once · last asked Oct 4 · Concept · Junior
If you had to introduce DBMS to students in your first class, what would your opening remarks be?
Asked once · last asked Oct 12 · Scenario · Mid-level
What are the data type differences between PostgreSQL and Oracle, including character types and length, and what is the impact on the API side?
Asked once · last asked Oct 16 · Concept · Mid-level
What factors guide your choice of databases for a backend project?
Asked once · last asked Oct 23 · Design · Mid-level
Is TRUNCATE DDL or DML?
Asked once · last asked Jul 20 · Concept · Junior
Other ways it was asked
- “Why is TRUNCATE classified as DDL while DELETE is classified as DML?”
When should you use a relational database?
Asked once · last asked Feb 23 · Concept · Junior
What data types can be used to store monetary amounts precisely?
Asked once · last asked Feb 23 · Concept · Junior
Other ways it was asked
- “What other data type can be used to store monetary amounts precisely?”
What are the four basic SQL commands for working with data in a relational database?
Asked once · last asked Mar 2 · Concept · Junior
What is an Oracle database, and what are its types?
Asked once · last asked Mar 9 · Concept · Junior
Can you explain the different types of Oracle databases in more detail?
Asked once · last asked Mar 9 · Concept · Junior
Are database files organized by rows or by columns?
Asked once · last asked Apr 4 · Concept · Junior
How do you create a new table in SQL?
Asked once · last asked Apr 8 · Write code · Junior
What does SQL stand for, and what is its primary purpose in working with databases?
Asked once · last asked Apr 15 · Concept · Junior
How do you create a SQL table with columns named ID and name?
Asked once · last asked Apr 15 · Write code · Junior
Other ways it was asked
- “How do you write a SQL CREATE TABLE statement for a table with ID and name columns, including their data types?”
What does the asterisk in a SQL SELECT clause do?
Asked once · last asked Apr 15 · Concept · Junior
What is the difference between using an asterisk and specifying columns in a SQL SELECT clause?
Asked once · last asked Apr 15 · Concept · Junior
How do you use an error message to identify and fix a SQL syntax error?
Asked once · last asked Apr 15 · Scenario · Junior
What is an object-relational database?
Asked once · last asked May 2 · Concept · Junior
Please describe several database systems, such as PostgreSQL and Oracle.
Asked once · last asked May 19 · Concept · Mid-level
How can you find the current date in SQL using a function?
Asked once · last asked May 22 · Concept · Junior
What is a database?
Asked once · last asked Jun 11 · Concept · Junior
Other ways it was asked
- “Do you know what a database is?”
What is a database management system (DBMS)?
Asked once · last asked Jun 14 · Concept · Junior
Other ways it was asked
- “What is DBMS?”
What is a CASE statement, and when would you use one?
Asked once · last asked Jun 17 · Concept · Junior
How should a team weigh an existing technology stack and early design decisions when selecting a database?
Asked once · last asked Jun 18 · Scenario · Senior
What is MySQL?
Asked once · last asked Jun 18 · Concept · Junior
What does “nullable” mean?
Asked once · last asked Jun 20 · Concept · Junior
Why might you choose a SQL database for an application?
Asked once · last asked Jun 24 · Concept · Junior
Why might you choose PostgreSQL for an application?
Asked once · last asked Jun 24 · Concept · Junior
What string functions are available in SQL?
Asked once · last asked Jul 16 · Concept · Junior
What SQL functions do you know?
Asked once · last asked Jul 16 · Concept · Junior
Which relational database products does Oracle offer?
Asked once · last asked Nov 19 · Concept · Junior
Is DELETE a DDL or DML statement?
Asked once · last asked Jul 20 · Concept · Junior
What does TRUNCATE do?
Asked once · last asked Jul 20 · Concept · Junior
What types of SQL databases are you familiar with?
Asked once · last asked Jul 27 · Concept · Junior
Which SQL statement do you use to read data from a table?
Asked once · last asked Jul 27 · Concept · Junior
What are the primary components of a DBMS?
Asked once · last asked Dec 4 · Concept · Junior
How would you update a table if male and female gender values were mistakenly swapped?
Asked once · last asked Aug 20 · Scenario · Mid-level
How would you add a new column to a table or DataFrame?
Asked once · last asked Aug 25 · Write code · Junior
Write SQL or PySpark logic to swap values in a gender column.
Asked once · last asked Aug 25 · Write code · Junior
What is the main idea behind SQL?
Asked once · last asked Aug 25 · Concept · Junior
How do you specify data types for columns in SQL tables?
Asked once · last asked Aug 25 · Concept · Junior
How do you use comments in SQL to document a query?
Asked once · last asked Aug 25 · Tooling · Junior
How do you update a specific record in a database table using SQL?
Asked once · last asked Sep 8 · Tooling · Junior
What is auto increment in SQL?
Asked once · last asked Sep 11 · Concept · Junior
What is the purpose of ORDER BY?
Asked once · last asked Sep 28 · Concept · Junior
How do we check for NULL values in SQL?
Asked once · last asked Sep 28 · Concept · Junior
How will you use a database management system?
Asked once · last asked Sep 30 · Concept · Junior
What is the difference between DBMS and RDBMS?
Asked once · last asked Oct 7 · Concept · Junior
How would you query a database table to inspect its records?
Asked once · last asked Oct 9 · Concept · Junior
Is MongoDB a relational database or not?
Asked once · last asked Oct 21 · Concept · Junior
What are the objectives of database management?
Asked once · last asked Jan 8 · Concept · Junior
What are the main concepts in SQL? Could you explain them in detail?
Asked once · last asked Jan 25 · Concept · Junior
How do you use the SQL DELETE command to remove a row from a table?
Asked once · last asked Jan 25 · Concept · Junior
More SQL interview questions
- All SQL interview questions
- Database Design Interview Questions
- SQL Joins and Aggregation Interview Questions
- Advanced SQL Query Interview Questions
- SQL Views and Stored Procedures Interview Questions
- SQL Query Optimization and Indexing Interview Questions
- SQL Transactions and Concurrency Interview Questions
- Database Integration and Security Interview Questions
- Database Administration and Scaling Interview Questions
How this list is made
Every question here was asked by a real interviewer in a real job interview that a candidate ran MeetAssist in. After the call, the interviewer's questions are pulled from the transcript. Practice sessions, tests, exams and anything that was not a job interview are dropped.
Questions are rewritten so they make sense on their own: names of people, employers and clients are removed, and speech-to-text mistakes are fixed. Small talk, logistics and questions about one candidate's own résumé are left out. Rephrasings of the same question are merged, and the count is the number of different interviews it came up in.
The interviews come from candidates who use MeetAssist, so they lean towards software, data and AI roles: the shares describe these interviews, not every SQL interview. Answers to the most asked questions are written and checked by an editor; a "common mistake" is shown only when reviews of real answers in these interviews show it, with the count.
612 interviews, 357 candidates, Nov 2025 to Oct 2026. Updated every month with new interviews.
Or add the Chrome extension