Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.
visible to other transactions. What interviewers expect A clear definition tied to SQL in SQL & Databases projects Trade-offs (performance, maintainability, security, cost) When you would and would not use it in prod…
Answer: matched rows from the left table. If there’s no match, NULL is returned for the left table. Use case: When you want all records from the right table. What interviewers expect A clear definition tied to SQL in SQL…
Trade-offs: CA (Consistency and Availability): Systems that prioritize consistency and availability will fail during network partitions. CP (Consistency and Partition Tolerance): Systems that prioritize consistency and p…
Answer: Use ETL (Extract, Transform, Load) tools to clean, transform, and shape the data as required. What interviewers expect A clear definition tied to SQL in SQL & Databases projects Trade-offs (performance, maint…
Answer: Set up continuous integration (CI) pipelines to test schema migrations on different environments to ensure smooth deployment. What interviewers expect A clear definition tied to SQL in SQL & Databases project…
Each tenant gets its own database instance. Pros: Complete isolation, better security, and individual scaling. Cons: Higher overhead for database management and maintenance. Example: SaaS applications often use multi-ten…
A flexible schema design used for scenarios where attributes of entities are dynamic and can vary over time. Example: A Product might have a variety of attributes like size, color, and weight, but some products may not h…
Answer: Use pagination techniques (LIMIT, OFFSET, or ROWNUM) to retrieve data in chunks rather than all at once. Avoid fetching unnecessary columns or rows. What interviewers expect A clear definition tied to SQL in SQL…
Answer: Track buffer cache hit ratio, transaction log size, locks and deadlocks, and cache usage to monitor the internal database performance. What interviewers expect A clear definition tied to SQL in SQL & Database…
Horizontal scaling involves adding more database servers to distribute the load, typically using replication, sharding, or clustering. Advantages: It can handle much larger datasets and traffic since the workload is dist…
Answer: Data is written to both the primary and secondary database simultaneously. Advantages: Ensures data consistency between all replicas. Disadvantages: May incur performance overhead due to the need to wait for repl…
A transaction log backup records all the changes made to the database since the last transaction log backup. It allows point-in-time recovery. Advantages: Enables recovery of the database to any specific point in time (a…
files. Use access controls, roles, and policies to restrict access to backups. What interviewers expect A clear definition tied to SQL in SQL & Databases projects Trade-offs (performance, maintainability, security, c…
responsibilities. Example (SQL Server): - Create a role CREATE ROLE Manager; - Grant permissions to the role GRANT SELECT, UPDATE ON Employees TO Manager; - Assign the role to a user EXEC sp_addrolemember 'Manager', 'joh…
Customers: Contains customer details (name, address, etc.). Orders: Contains order details and references customers. Order_Items: A join table between Orders and Products. Products: Product details (name, description, pr…
same type of data (e.g., storing multiple phone numbers in separate columns). What interviewers expect A clear definition tied to SQL in SQL & Databases projects Trade-offs (performance, maintainability, security, co…
on another non-key attribute). Ensure that no non-key attribute is dependent on another non-key attribute. For example: Original Table: Employee_ID Employee_Nam Department Department_Manager 1 Alice HR John 2 Bob IT Sara…
Answer: to retrieve data. To resolve this, indexes can be reorganized or rebuilt to improve their performance. What interviewers expect A clear definition tied to SQL in SQL & Databases projects Trade-offs (performan…
I/O, CPU, etc.) and chooses the one with the lowest cost. What interviewers expect A clear definition tied to SQL in SQL & Databases projects Trade-offs (performance, maintainability, security, cost) When you would a…
likely to improve performance when indexed. What interviewers expect A clear definition tied to SQL in SQL & Databases projects Trade-offs (performance, maintainability, security, cost) When you would and would not u…
the database can use the index to quickly find matching rows. What interviewers expect A clear definition tied to SQL in SQL & Databases projects Trade-offs (performance, maintainability, security, cost) When you wou…
PostgreSQL: PostgreSQL doesn’t have a built-in debugger, but you can use RAISE NOTICE for debugging or use third-party tools like pgAdmin for debugging. MySQL: MySQL Workbench provides a simple debugging interface that a…
CID stands for: Atomicity: Ensures that all operations in a transaction are completed successfully, or none are. If one part of a transaction fails, the whole transaction fails. Consistency: Guarantees that the database…
table can have the same primary key value. It ensures entity integrity. Example: user_id in a users table. Foreign Key: A field (or a combination of fields) in one table that uniquely identifies a row of another table. I…
permanent. What interviewers expect A clear definition tied to SQL in SQL & Databases projects Trade-offs (performance, maintainability, security, cost) When you would and would not use it in production Real-world ex…
SQL & Databases SQL Server Tutorial · SQL
visible to other transactions.
In a production SQL & Databases application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
SQL & Databases SQL Server Tutorial · SQL
Answer: matched rows from the left table. If there’s no match, NULL is returned for the left table. Use case: When you want all records from the right table.
In a production SQL & Databases application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
SQL & Databases SQL Server Tutorial · SQL
Trade-offs:
availability will fail during network partitions.
partition tolerance may not be available during network issues.
partition tolerance may return stale data.
SQL & Databases SQL Server Tutorial · SQL
Answer: Use ETL (Extract, Transform, Load) tools to clean, transform, and shape the data as required.
In a production SQL & Databases application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
SQL & Databases SQL Server Tutorial · SQL
Answer: Set up continuous integration (CI) pipelines to test schema migrations on different environments to ensure smooth deployment.
In a production SQL & Databases application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
SQL & Databases SQL Server Tutorial · SQL
Example: SaaS applications often use multi-tenancy to serve multiple clients with the same
infrastructure while keeping data separated.
SQL & Databases SQL Server Tutorial · SQL
dynamic and can vary over time.
weight, but some products may not have all attributes, so you store them as
key-value pairs.
SQL & Databases SQL Server Tutorial · SQL
Answer: Use pagination techniques (LIMIT, OFFSET, or ROWNUM) to retrieve data in chunks rather than all at once. Avoid fetching unnecessary columns or rows.
In a production SQL & Databases application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
SQL & Databases SQL Server Tutorial · SQL
Answer: Track buffer cache hit ratio, transaction log size, locks and deadlocks, and cache usage to monitor the internal database performance.
In a production SQL & Databases application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
SQL & Databases SQL Server Tutorial · SQL
load, typically using replication, sharding, or clustering.
workload is distributed across multiple servers.
specialized techniques like load balancing and data partitioning.
SQL & Databases SQL Server Tutorial · SQL
Answer: Data is written to both the primary and secondary database simultaneously. Advantages: Ensures data consistency between all replicas. Disadvantages: May incur performance overhead due to the need to wait for replication.
In a production SQL & Databases application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
SQL & Databases SQL Server Tutorial · SQL
the last transaction log backup. It allows point-in-time recovery.
(assuming all previous logs are available).
full recovery.
moment in time by replaying the logs up to that point.
SQL & Databases SQL Server Tutorial · SQL
files. Use access controls, roles, and policies to restrict access to backups.
In a production SQL & Databases application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
SQL & Databases SQL Server Tutorial · SQL
responsibilities.
Example (SQL Server):
CREATE ROLE Manager;
GRANT SELECT, UPDATE ON Employees TO Manager;
EXEC sp_addrolemember 'Manager', 'john_doe';
In PostgreSQL or MySQL, you would follow similar steps using GRANT statements and role
management commands.
SQL & Databases SQL Server Tutorial · SQL
SQL & Databases SQL Server Tutorial · SQL
same type of data (e.g., storing multiple phone numbers in separate columns).
In a production SQL & Databases application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
SQL & Databases SQL Server Tutorial · SQL
on another non-key attribute). Ensure that no non-key attribute is dependent on
another non-key attribute.
For example:
Employee_ID Employee_Nam
Department Department_Manager
1 Alice HR John
2 Bob IT Sarah
employees and departments.
on Department, not directly on Employee, so it should be moved to a separate table
for Departments.
SQL & Databases SQL Server Tutorial · SQL
Answer: to retrieve data. To resolve this, indexes can be reorganized or rebuilt to improve their performance.
In a production SQL & Databases application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
SQL & Databases SQL Server Tutorial · SQL
I/O, CPU, etc.) and chooses the one with the lowest cost.
In a production SQL & Databases application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
SQL & Databases SQL Server Tutorial · SQL
likely to improve performance when indexed.
In a production SQL & Databases application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
SQL & Databases SQL Server Tutorial · SQL
the database can use the index to quickly find matching rows.
In a production SQL & Databases application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.
SQL & Databases SQL Server Tutorial · SQL
NOTICE for debugging or use third-party tools like pgAdmin for debugging.
stepping through the stored procedure and monitoring execution.
Example (PostgreSQL):
RAISE NOTICE 'Debugging variable: %', my_variable;
SQL & Databases SQL Server Tutorial · SQL
CID stands for:
none are. If one part of a transaction fails, the whole transaction fails.
rules, including constraints, after a transaction.
one transaction does not interfere with another.
case of system failures.
SQL & Databases SQL Server Tutorial · SQL
table can have the same primary key value. It ensures entity integrity.
Example: user_id in a users table.
row of another table. It establishes a relationship between two tables and enforces
referential integrity.
Example: user_id in an orders table linking to user_id in the users table.
SQL & Databases SQL Server Tutorial · SQL
permanent.
In a production SQL & Databases application, teams apply this when handling user-facing features or integration boundaries. For example, you might use it during a sprint where reliability and observability matter—logging metrics, validating edge cases, and documenting the decision in an ADR so future developers understand why the approach was chosen.
Tip: Practice aloud on Toolliyo mock interview or the Interview Q&A section before your real interview.