Interview Q&A

Master technical and career interviews with structured answers—short definition, real examples, pitfalls, and how to answer in 60–90 seconds.

4608 total questions 4508 technical 100 career & HR 4272 from PDF library

Showing 901–925 of 963

Career & HR topics

By tech stack

Popular tracks

Junior PDF
What is the purpose of the $in operator in MongoDB?

Short answer: The $in operator is used to match values in a specified array. It checks if the value of a field is equal to any value in the provided array. Example code db.collection.find({ age: { $in: [25, 30, 35] } });…

Junior PDF
What is the difference between a replica set and a sharded cluster in MongoDB?

Short answer: utomatically. Sharded Cluster: Used for horizontal scaling. It splits data across multiple servers (shards) based on a shard key. Each shard holds a portion of the data, and a mongos router directs queries…

Junior PDF
What is the difference between a replica set and a sharded cluster in MongoDB?

Short answer: Replica Set: A group of MongoDB servers that maintain the same data. Explain a bit more It provides high availability and data redundancy by replicating data across multiple servers. If the primary server g…

Junior PDF
What is the difference between the find() and findOne() methods in MongoDB?

Short answer: find(): Returns a cursor to all documents that match the query. You can iterate over the results using .forEach() or convert them to an array with .toArray(). Example code db.collection.find({ age: { $gt: 3…

Junior PDF
What is the Aggregation framework in MongoDB?

Short answer: And count occurrences { $sort: { count: -1 } } // Sort by count in descending order ]); nd count occurrences { $sort: { count: -1 } } // Sort by count in descending order ]); And count occurrences { $sort:…

Junior PDF
What is the Aggregation framework in MongoDB?

Short answer: How do you use it? The Aggregation Framework in MongoDB is used to perform complex data processing tasks such as grouping, filtering, sorting, and reshaping documents. It uses a pipeline of stages to proces…

Junior PDF
What is data modeling in MongoDB?

Short answer: ccessed in the database. Since MongoDB is schema-less, data modeling involves deciding how to structure documents, collections, and their relationships (embedded vs. referenced documents) to balance perform…

Junior PDF
What is data modeling in MongoDB?

Short answer: Data modeling in MongoDB refers to the design of how data will be stored, organized, and accessed in the database. Since MongoDB is schema-less, data modeling involves deciding how to structure documents, c…

Junior PDF
What is a MongoDB document schema?

Short answer: A document schema defines the structure, rules, and validations for documents in a collection. MongoDB is schema-less by default, but you can enforce schema validation rules using MongoDB schema validation.…

Junior PDF
What is MongoDB Atlas and how does it work?

Short answer: MongoDB Atlas is a fully-managed cloud database service provided by MongoDB Inc. It offers: Automated backups, scaling, and updates. Multi-cloud support (AWS, GCP, Azure). Advanced security features like en…

Junior PDF
What is database security and why is it important?

Short answer: Database security refers to the practices, tools, and measures used to protect a database from unauthorized access, misuse, modification, or destruction of its data. Explain a bit more It ensures the confid…

Junior PDF
What is SQL injection and how do you prevent it?

Short answer: s data, not executable code. - Example in MySQL (using PDO in PHP) $stmt = $pdo->prepare('SELECT * FROM users WHERE username = :username AND password = :password'); $stmt->execute(['username' => $u…

Junior PDF
What is SQL injection and how do you prevent it?

Short answer: SQL Injection is a type of attack where an attacker inserts or manipulates malicious SQL code into a query, which can compromise the database. Explain a bit more It usually happens when user input is improp…

Junior PDF
What is point-in-time recovery in database management?

Short answer: fter the full backup until the specified point in time. SQL Server RESTORE DATABASE MyDatabase FROM DISK = 'C:\Backups\MyDatabase.bak'; RESTORE LOG MyDatabase FROM DISK = 'C:\Backups\MyDatabase_log.trn' WIT…

Junior PDF
What is point-in-time recovery in database management?

Short answer: Point-in-time recovery (PITR) allows you to restore a database to a specific moment in time, which can be crucial in scenarios where: Data corruption or accidental deletion occurs. Explain a bit more You wa…

Junior PDF
What is database scaling, and how do you scale databases vertically and horizontally?

Short answer: Database scaling refers to increasing a database's ability to handle more workload—either by increasing the resources available to a single instance or distributing the load across multiple instances. Real-…

Junior PDF
What is a read replica and how does it help with scaling?

Short answer: A read replica is a copy of a database that is used to offload read-only queries from the primary database (master). Explain a bit more It is particularly useful for handling high read traffic and improving…

Junior PDF
What is database caching and how does it improve performance?

Short answer: Database caching involves storing frequently accessed data in a faster storage layer (e.g., memory) so that future requests for the same data can be served more quickly, reducing the need to query the datab…

Junior PDF
What is the role of query optimization in database performance?

Short answer: Query optimization is the process of improving the efficiency of SQL queries to reduce resource consumption and improve response time. Explain a bit more The goal is to make sure that queries are executed u…

Junior PDF
What is event sourcing in databases?

Short answer: Event sourcing is a pattern where the state of an application is determined by a sequence of events, rather than storing the current state directly in the database. Explain a bit more How it works: Instead…

Junior PDF
What is a database materialized view?

Short answer: A materialized view is a database object that stores the results of a query physically, unlike a regular view, which computes its result dynamically. Explain a bit more Advantages: Faster query response tim…

Junior PDF
What is a time-series database?

Short answer: A time-series database (TSDB) is optimized for storing, querying, and managing time-stamped data (data associated with timestamps), often used for tracking events or metrics over time. Explain a bit more Us…

Junior PDF
What is database sharding and when do you use it?

Short answer: Sharding is the process of breaking a large database into smaller, more manageable pieces (shards), each of which is stored on a different server. Explain a bit more When to use it: When a single database s…

Junior PDF
What is the purpose of the DISTINCT keyword in SQL?

Short answer: The DISTINCT keyword is used to return only unique values in the result set, removing any duplicate rows. Example code SELECT DISTINCT Country FROM Customers; This will return a list of unique countries fro…

Junior PDF
What is a UNION in SQL?

Short answer: The UNION operator combines the result sets of two or more SELECT queries into a single result set and removes duplicate records. All SELECT queries must have the same number of columns with compatible data…

SQL & Databases SQL Server Tutorial · SQL

Short answer: The $in operator is used to match values in a specified array. It checks if the value of a field is equal to any value in the provided array.

Example code

db.collection.find({ age: { $in: [25, 30, 35] } }); This query finds all documents where the age field is 25, 30, or 35.

Real-world example (ShopNest)

ShopNest’s SQL Server database stores customers, products, and orders. Good indexes and clear foreign keys keep checkout queries fast and safe.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

SQL & Databases SQL Server Tutorial · SQL

Short answer: utomatically. Sharded Cluster: Used for horizontal scaling. It splits data across multiple servers (shards) based on a shard key. Each shard holds a portion of the data, and a mongos router directs queries to the correct shard. Sharding helps manage large datasets by distributing the load.

Real-world example (ShopNest)

ShopNest’s SQL Server database stores customers, products, and orders. Good indexes and clear foreign keys keep checkout queries fast and safe.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

SQL & Databases SQL Server Tutorial · SQL

Short answer: Replica Set: A group of MongoDB servers that maintain the same data.

Explain a bit more

It provides high availability and data redundancy by replicating data across multiple servers. If the primary server goes down, one of the secondaries can be promoted to primary automatically. Sharded Cluster: Used for horizontal scaling. It splits data across multiple servers (shards) based on a shard key. Each shard holds a portion of the data, and a mongos router directs queries to the correct shard. Sharding helps manage large datasets by distributing the load.

Real-world example (ShopNest)

ShopNest’s SQL Server database stores customers, products, and orders. Good indexes and clear foreign keys keep checkout queries fast and safe.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

SQL & Databases SQL Server Tutorial · SQL

Short answer: find(): Returns a cursor to all documents that match the query. You can iterate over the results using .forEach() or convert them to an array with .toArray().

Example code

db.collection.find({ age: { $gt: 30 } }); findOne(): Returns the first document that matches the query, or null if no document is found. Example: db.collection.findOne({ name: "Alice" });

Real-world example (ShopNest)

ShopNest’s SQL Server database stores customers, products, and orders. Good indexes and clear foreign keys keep checkout queries fast and safe.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

SQL & Databases SQL Server Tutorial · SQL

Short answer: And count occurrences { $sort: { count: -1 } } // Sort by count in descending order ]); nd count occurrences { $sort: { count: -1 } } // Sort by count in descending order ]); And count occurrences { $sort: { count: -1 } } // Sort by count in descending order ]); nd count occurrences { $sort: { count: -1 } } // Sort by count in descending order ]);

Real-world example (ShopNest)

ShopNest’s SQL Server database stores customers, products, and orders. Good indexes and clear foreign keys keep checkout queries fast and safe.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

SQL & Databases SQL Server Tutorial · SQL

Short answer: How do you use it? The Aggregation Framework in MongoDB is used to perform complex data processing tasks such as grouping, filtering, sorting, and reshaping documents. It uses a pipeline of stages to process documents:

Example code

db.collection.aggregate([ { $match: { status: "active" } }, // Filter documents { $group: { _id: "$age", count: { $sum: 1 } } }, // Group by age and count occurrences { $sort: { count: -1 } } // Sort by count in descending order ]);

Real-world example (ShopNest)

ShopNest’s SQL Server database stores customers, products, and orders. Good indexes and clear foreign keys keep checkout queries fast and safe.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

SQL & Databases SQL Server Tutorial · SQL

Short answer: ccessed in the database. Since MongoDB is schema-less, data modeling involves deciding how to structure documents, collections, and their relationships (embedded vs. referenced documents) to balance performance, scalability, and ease of querying.

Real-world example (ShopNest)

ShopNest’s SQL Server database stores customers, products, and orders. Good indexes and clear foreign keys keep checkout queries fast and safe.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

SQL & Databases SQL Server Tutorial · SQL

Short answer: Data modeling in MongoDB refers to the design of how data will be stored, organized, and accessed in the database. Since MongoDB is schema-less, data modeling involves deciding how to structure documents, collections, and their relationships (embedded vs. referenced documents) to balance performance, scalability, and ease of querying.

Real-world example (ShopNest)

ShopNest’s SQL Server database stores customers, products, and orders. Good indexes and clear foreign keys keep checkout queries fast and safe.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

SQL & Databases SQL Server Tutorial · SQL

Short answer: A document schema defines the structure, rules, and validations for documents in a collection. MongoDB is schema-less by default, but you can enforce schema validation rules using MongoDB schema validation. Example: db.createCollection("users", { validator: { $jsonSchema: { bsonType: "object", required: ["name", "email"], properties: { name: { bsonType: "string" }, email: { bsonType: "string" } }

Example code

}
} });

Real-world example (ShopNest)

ShopNest’s SQL Server database stores customers, products, and orders. Good indexes and clear foreign keys keep checkout queries fast and safe.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

SQL & Databases SQL Server Tutorial · SQL

Short answer: MongoDB Atlas is a fully-managed cloud database service provided by MongoDB Inc. It offers: Automated backups, scaling, and updates. Multi-cloud support (AWS, GCP, Azure). Advanced security features like encryption and IP whitelisting. Monitoring and performance optimization tools. Global replication across different regions.

Real-world example (ShopNest)

ShopNest’s SQL Server database stores customers, products, and orders. Good indexes and clear foreign keys keep checkout queries fast and safe.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

SQL & Databases SQL Server Tutorial · SQL

Short answer: Database security refers to the practices, tools, and measures used to protect a database from unauthorized access, misuse, modification, or destruction of its data.

Explain a bit more

It ensures the confidentiality, integrity, and availability (often referred to as the CIA triad) of the data stored within the database. Why it's important: Confidentiality: Protects sensitive data from unauthorized access (e.g., personal information, financial data). Integrity: Ensures data remains accurate, consistent, and unaltered by unauthorized users. Availability: Ensures data is available when needed and prevents disruptions from threats like ransomware or DDoS attacks.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

SQL & Databases SQL Server Tutorial · SQL

Short answer: s data, not executable code. - Example in MySQL (using PDO in PHP) $stmt = $pdo->prepare('SELECT * FROM users WHERE username = :username AND password = :password'); $stmt->execute(['username' => $username, 'password' => $password]); ● Input Validation: Always validate user input by checking for expected data types, lengths, and ranges. s data, not…… executable code. - Example in MySQL (using PDO in PHP) $stmt =…

Explain a bit more

$pdo->prepare('SELECT * FROM users WHERE username = :username AND password = :password'); $stmt->execute(['username' => $username, 'password' => $password]); ● Input Validation: Always validate user input by checking for expected data types, lengths, and ranges. Escaping User Input:… s data, not executable code. - Example in MySQL (using PDO in PHP) $stmt = $pdo->prepare('SELECT * FROM users WHERE username = :username AND password = :password'); $stmt->execute(['username' => $username, 'password' => $password]); ● Input Validation: Always validate user input by checking for expected data types, lengths, and ranges. Escaping…

Real-world example (ShopNest)

ShopNest’s SQL Server database stores customers, products, and orders. Good indexes and clear foreign keys keep checkout queries fast and safe.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

SQL & Databases SQL Server Tutorial · SQL

Short answer: SQL Injection is a type of attack where an attacker inserts or manipulates malicious SQL code into a query, which can compromise the database.

Explain a bit more

It usually happens when user input is improperly sanitized or validated. Prevention techniques: Use Prepared Statements/Parameterized Queries: This ensures that user input is treated as data, not executable code. - Example in MySQL (using PDO in PHP) $stmt = $pdo->prepare('SELECT * FROM users WHERE username = :username AND password = :password'); $stmt->execute(['username' => $username, 'password' => $password]); ● Input Validation: Always validate user input by checking for expected data types, lengths, and ranges. Escaping User Input: If parameters cannot be parameterized, make sure all user input is properly escaped. Least Privilege Principle: Limit database user permissions to only those necessary to perform their tasks. Web Application Firewalls (WAF): Use WAFs to detect and block SQL injection attacks.

Real-world example (ShopNest)

ShopNest’s SQL Server database stores customers, products, and orders. Good indexes and clear foreign keys keep checkout queries fast and safe.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

SQL & Databases SQL Server Tutorial · SQL

Short answer: fter the full backup until the specified point in time. SQL Server RESTORE DATABASE MyDatabase FROM DISK = 'C:\Backups\MyDatabase.bak'; RESTORE LOG MyDatabase FROM DISK = 'C:\Backups\MyDatabase_log.trn' WITH STOPAT = '2023-09-14T15:30:00'; -- Restore up to a specific time PostgreSQL

Example code

To enable point-in-time recovery, you need to restore a base backup, then use WAL (Write-Ahead Logging) archives to apply changes until the desired point. fter the full backup until the specified point in time. SQL Server Example: RESTORE DATABASE MyDatabase FROM DISK = 'C:\Backups\MyDatabase.bak'; RESTORE LOG MyDatabase FROM DISK = 'C:\Backups\MyDatabase_log.trn' WITH STOPAT = '2023-09-14T15:30:00'; -- Restore up to a specific time PostgreSQL Example: To enable point-in-time recovery, you need to restore a base backup, then use WAL (Write-Ahead Logging) archives to apply changes until the desired point. fter the full backup until the specified point in time. SQL Server Example: RESTORE DATABASE MyDatabase FROM DISK = 'C:\Backups\MyDatabase.bak'; RESTORE LOG MyDatabase FROM DISK = 'C:\Backups\MyDatabase_log.trn' WITH STOPAT = '2023-09-14T15:30:00'; -- Restore up to a specific time PostgreSQL Example: To enable point-in-time recovery, you need to restore a base backup, then use WAL (Write-Ahead Logging) archives to apply changes until the desired point. You would also set the restore_command in recovery.conf and specify the recovery_target_time. fter the full backup until the specified point in time. SQL Server Example: RESTORE DATABASE MyDatabase FROM DISK = 'C:\Backups\MyDatabase.bak'; RESTORE LOG MyDatabase FROM DISK = 'C:\Backups\MyDatabase_log.trn' WITH STOPAT = '2023-09-14T15:30:00'; -- Restore up to a specific time PostgreSQL Example: To enable point-in-time recovery, you need to restore a base backup, then use WAL (Write-Ahead Logging) archives to apply changes until the desired point. You would also set the restore_command in recovery.conf and specify the recovery_target_time.

Real-world example (ShopNest)

ShopNest’s SQL Server database stores customers, products, and orders. Good indexes and clear foreign keys keep checkout queries fast and safe.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

SQL & Databases SQL Server Tutorial · SQL

Short answer: Point-in-time recovery (PITR) allows you to restore a database to a specific moment in time, which can be crucial in scenarios where: Data corruption or accidental deletion occurs.

Explain a bit more

You want to rollback to a specific moment before a harmful event. How it works: First, a full backup is restored. Then, transaction log backups are applied, allowing you to replay changes made after the full backup until the specified point in time. SQL Server

Example code

RESTORE DATABASE MyDatabase FROM DISK = 'C:\Backups\MyDatabase.bak'; RESTORE LOG MyDatabase FROM DISK = 'C:\Backups\MyDatabase_log.trn' WITH STOPAT = '2023-09-14T15:30:00'; -- Restore up to a specific time PostgreSQL Example: To enable point-in-time recovery, you need to restore a base backup, then use WAL (Write-Ahead Logging) archives to apply changes until the desired point. You would also set the restore_command in recovery.conf and specify the recovery_target_time.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

SQL & Databases SQL Server Tutorial · SQL

Short answer: Database scaling refers to increasing a database's ability to handle more workload—either by increasing the resources available to a single instance or distributing the load across multiple instances.

Real-world example (ShopNest)

ShopNest’s SQL Server database stores customers, products, and orders. Good indexes and clear foreign keys keep checkout queries fast and safe.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

SQL & Databases SQL Server Tutorial · SQL

Short answer: A read replica is a copy of a database that is used to offload read-only queries from the primary database (master).

Explain a bit more

It is particularly useful for handling high read traffic and improving database scalability. How it helps with scaling: By distributing read requests across multiple replicas, the primary database can focus on write operations, reducing the load on the master. It improves performance by providing additional resources dedicated to read operations. Example: In a web application with high traffic, multiple read replicas can serve read-heavy queries, while writes are only made to the master database. Note: Read replicas are usually asynchronous, meaning there can be a slight delay in replication. For critical real-time reads, this might not be suitable.

Real-world example (ShopNest)

ShopNest’s SQL Server database stores customers, products, and orders. Good indexes and clear foreign keys keep checkout queries fast and safe.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

SQL & Databases SQL Server Tutorial · SQL

Short answer: Database caching involves storing frequently accessed data in a faster storage layer (e.g., memory) so that future requests for the same data can be served more quickly, reducing the need to query the database repeatedly.

Explain a bit more

How it improves performance: Reduces database load: Instead of querying the database every time data is requested, the cache can provide instant access to commonly requested data. Improves response time: Caching data in-memory (using technologies like Redis or Memcached) makes it accessible in nanoseconds, compared to the millisecond access time of traditional disk-based databases. Reduces latency: Caching significantly reduces the time taken to fetch data, improving the overall user experience. Example: Frequently accessed user profiles in a web application can be cached using Redis, so that subsequent requests don't have to query the database again.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

SQL & Databases SQL Server Tutorial · SQL

Short answer: Query optimization is the process of improving the efficiency of SQL queries to reduce resource consumption and improve response time.

Explain a bit more

The goal is to make sure that queries are executed using the most efficient execution plan possible. Why it's important: Optimized queries help reduce CPU load, memory consumption, and I/O operations, improving overall system performance. It prevents slow queries that might degrade the user experience or cause resource contention in high-traffic applications. Common techniques: Indexing: Using appropriate indexes can drastically reduce query times. **Avoiding SELECT ***: Only select the necessary columns instead of selecting all columns. Query refactoring: Break down complex queries into simpler ones, or replace subqueries with joins when possible. Using appropriate joins: Ensure proper joins are used (e.g., INNER JOIN vs. OUTER JOIN). Limit result set: Use LIMIT or TOP to reduce the number of rows returned.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

SQL & Databases SQL Server Tutorial · SQL

Short answer: Event sourcing is a pattern where the state of an application is determined by a sequence of events, rather than storing the current state directly in the database.

Explain a bit more

How it works: Instead of storing the current state of an entity, each change to that entity (event) is stored as an immutable event in an event store. The state can be reconstructed by replaying the events. Advantages: You have a complete audit trail of changes. Enables eventual consistency and can scale well in distributed systems. Use cases: CQRS (Command Query Responsibility Segregation), systems requiring full audit logs, and systems that need to capture historical data changes.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

SQL & Databases SQL Server Tutorial · SQL

Short answer: A materialized view is a database object that stores the results of a query physically, unlike a regular view, which computes its result dynamically.

Explain a bit more

Advantages: Faster query response times as the results are precomputed and stored. Can be refreshed periodically (e.g., every hour or after specific events) to keep the data up to date. Use cases: Reporting, data warehousing, and aggregation-heavy applications. Example: A materialized view could aggregate sales data by day, allowing a query to retrieve the precomputed values instead of performing costly aggregation on the fly.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

SQL & Databases SQL Server Tutorial · SQL

Short answer: A time-series database (TSDB) is optimized for storing, querying, and managing time-stamped data (data associated with timestamps), often used for tracking events or metrics over time.

Explain a bit more

Use cases: IoT data, server logs, stock prices, sensor data, application monitoring, etc. Characteristics: Data is ordered by timestamps. Efficient for inserting large volumes of data continuously. Optimized for queries that focus on time ranges (e.g., finding data from a particular hour or day). Examples: InfluxDB, TimescaleDB, Prometheus.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

SQL & Databases SQL Server Tutorial · SQL

Short answer: Sharding is the process of breaking a large database into smaller, more manageable pieces (shards), each of which is stored on a different server.

Explain a bit more

When to use it: When a single database server can no longer handle the volume of data or queries. When scaling vertically (increasing server resources) is no longer cost-effective or possible. How it works: The data is divided based on a specific shard key (e.g., user ID, geographic region, etc.). Each shard contains a subset of the data and is stored on a separate server or cluster. Example: In an e-commerce platform, you could shard user data based on geographic region. Users from the US might be stored in one shard, while users from Europe are stored in another.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

SQL & Databases SQL Server Tutorial · SQL

Short answer: The DISTINCT keyword is used to return only unique values in the result set, removing any duplicate rows.

Example code

SELECT DISTINCT Country FROM Customers; This will return a list of unique countries from the Customers table.

Real-world example (ShopNest)

ShopNest’s SQL Server database stores customers, products, and orders. Good indexes and clear foreign keys keep checkout queries fast and safe.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share

SQL & Databases SQL Server Tutorial · SQL

Short answer: The UNION operator combines the result sets of two or more SELECT queries into a single result set and removes duplicate records. All SELECT queries must have the same number of columns with compatible data types.

Example code

SELECT Name FROM Employees UNION SELECT Name FROM Customers;

Real-world example (ShopNest)

ShopNest’s SQL Server database stores customers, products, and orders. Good indexes and clear foreign keys keep checkout queries fast and safe.

Say this in the interview

  1. Define — one clear sentence (the short answer above).
  2. Example — relate it to a project like ShopNest or your real work.
  3. Trade-off — when you would not use it.
Permalink & share
Toolliyo Assistant
Ask about tutorials, ebooks, training, pricing, mentor services, and support. I use public site content only—not admin or internal tools.

care@toolliyo.com

Need callback? Share your details