Showing posts with label #Database. Show all posts
Showing posts with label #Database. Show all posts

19 December 2025

#Azure_Cosmos_DB

#Azure_Cosmos_DB

Key Concepts


S.No Topic Sub-Topics
1 Introduction to Azure Cosmos DB What is Cosmos DB?, Features, Advantages, Global distribution, Use cases
2 Cosmos DB Architecture Database account, Containers, Partitioning, Replication, Consistency models
3 Cosmos DB APIs SQL API, MongoDB API, Cassandra API, Gremlin API, Table API
4 Setting Up Cosmos DB Creating account, Configuring database, Creating containers, Keys and connection strings, Portal overview
5 Data Modeling Document structure, JSON schema, Container design, Partition key selection, Best practices
6 CRUD Operations Create item, Read item, Update item, Delete item, Bulk operations
7 Querying Data SQL queries, Parameterized queries, Filtering, Sorting, Pagination
8 Partitioning Logical partitions, Physical partitions, Partition key design, Performance impact, Repartitioning
9 Indexing Automatic indexing, Custom indexing policies, Composite indexes, Spatial indexes, Indexing best practices
10 Consistency Models Strong, Bounded staleness, Session, Consistent prefix, Eventual consistency
11 Throughput & Request Units Provisioned throughput, Autoscale, RU calculation, Scaling, Monitoring RU consumption
12 Change Feed Overview, Enabling change feed, Event processing, Azure Functions integration, Use cases
13 Cosmos DB SDKs .NET SDK, Java SDK, Python SDK, Node.js SDK, CRUD operations
14 Transactional Batch Batch operations, ACID transactions, Atomicity, Limitations, Use cases
15 Stored Procedures Creating stored procedures, JavaScript support, Parameters, Error handling, Execution
16 Triggers Pre-triggers, Post-triggers, JavaScript triggers, Execution order, Use cases
17 User Defined Functions (UDFs) Creating UDFs, JavaScript functions, Query integration, Return types, Use cases
18 Security & Authentication Access keys, Role-based access control, Managed identities, IP firewalls, Encryption
19 Backup & Restore Automatic backups, Point-in-time restore, Geo-backup, Recovery options, Best practices
20 Monitoring & Metrics Azure Monitor, Metrics, Logs, Alerts, Performance tracking
21 Scaling & Performance Horizontal scaling, Vertical scaling, Partitioning impact, Throughput tuning, Latency optimization
22 Multi-region Distribution Global distribution, Read regions, Write regions, Failover policies, Replication latency
23 Cosmos DB Emulator Installation, Local development, API support, Testing, Limitations
24 Data Migration Azure Data Factory, BCP tool, Migration from MongoDB, CSV/JSON import, Bulk import
25 Integration with Azure Services Azure Functions, Logic Apps, Event Grid, Synapse Analytics, Stream Analytics
26 Cosmos DB & Microservices Event sourcing, CQRS pattern, Cache integration, Messaging, Real-time processing
27 Cost Management Estimating RUs, Autoscale costs, Reserved capacity, Cost monitoring, Optimization
28 Troubleshooting Common errors, Connectivity issues, Query performance, Partition issues, Logging
29 Best Practices Partition key selection, Indexing strategy, Throughput optimization, Global distribution, Security practices
30 Projects & Labs CRUD project, Change feed project, Global distribution lab, Cosmos DB + Functions, Performance testing lab

Interview question

📘 Basic Level

  1. What is Azure Cosmos DB?
  2. What are the key features of Cosmos DB?
  3. What is a multi-model database?
  4. How is Cosmos DB different from traditional SQL databases?
  5. What are the supported APIs in Cosmos DB?
  6. What is a database account in Cosmos DB?
  7. What is a container in Cosmos DB?
  8. What is an item/document in Cosmos DB?
  9. What is a partition key?
  10. What is logical partition vs physical partition?
  11. What is Request Unit (RU)?
  12. What are the consistency levels supported in Cosmos DB?
  13. What is strong consistency?
  14. What is eventual consistency?
  15. What is session consistency?
  16. What is bounded staleness consistency?
  17. What is consistent prefix consistency?
  18. How do you create a database in Cosmos DB?
  19. How do you create a container in Cosmos DB?
  20. What are Cosmos DB throughput models?
  21. What is serverless mode in Cosmos DB?
  22. What is provisioned throughput in Cosmos DB?
  23. What is automatic indexing?
  24. How do you query documents using SQL API?
  25. What SDKs are supported by Cosmos DB?

📗 Intermediate Level

  1. How does Cosmos DB handle global distribution?
  2. How do you add a region to Cosmos DB account?
  3. How does multi-master replication work?
  4. What is a composite index in Cosmos DB?
  5. What is a spatial index in Cosmos DB?
  6. How do you optimize RU usage?
  7. What are stored procedures in Cosmos DB?
  8. How do triggers work in Cosmos DB?
  9. What is a User Defined Function (UDF)?
  10. How do transactions work in Cosmos DB?
  11. How does Cosmos DB handle large data volumes?
  12. What is the change feed in Cosmos DB?
  13. How do you use change feed processor?
  14. How does Cosmos DB ensure low latency?
  15. What is the difference between single-region and multi-region writes?
  16. What is failover priority in Cosmos DB?
  17. How do you monitor Cosmos DB performance?
  18. How do you set alerts in Cosmos DB?
  19. What is indexing policy in Cosmos DB?
  20. How do you handle TTL (Time-to-Live) in Cosmos DB?
  21. How do you delete data using TTL?
  22. How do you handle large queries in Cosmos DB?
  23. How do you use LINQ queries with Cosmos DB SDK?
  24. How do you migrate data into Cosmos DB?
  25. How do you handle conflicts in multi-master Cosmos DB?

📕 Advanced Level

  1. How do you design partition strategy for high-scale workloads?
  2. How do you optimize queries for RU efficiency?
  3. How do you design globally distributed applications with Cosmos DB?
  4. How does Cosmos DB handle multi-region replication conflicts?
  5. What is analytical store in Cosmos DB?
  6. How does Cosmos DB Synapse Link work?
  7. How do you perform bulk import/export in Cosmos DB?
  8. How do you manage throughput across multiple containers?
  9. How do you implement geo-redundancy in Cosmos DB?
  10. What are the trade-offs between single-region and multi-region writes?
  11. How do you configure consistency level at query time?
  12. How do you implement change data capture using change feed?
  13. How do you handle schema evolution in Cosmos DB?
  14. How do you use Cosmos DB for real-time analytics?
  15. How do you design Cosmos DB for IoT workloads?
  16. How do you implement pagination in Cosmos DB queries?
  17. How do you monitor indexing metrics?
  18. How do you handle hot partitions in Cosmos DB?
  19. How do you optimize container design for high write workloads?
  20. How do you implement security using resource tokens?
  21. How do you use managed identities with Cosmos DB?
  22. How do you handle backups and restores in Cosmos DB?
  23. How do you implement auditing and logging in Cosmos DB?
  24. How do you scale Cosmos DB throughput dynamically?
  25. How do you tune queries for multi-region applications?

📓 Expert Level

  1. How do you design multi-tenant Cosmos DB architecture?
  2. How do you design Cosmos DB for mission-critical SLA compliance?
  3. How do you optimize cost while maintaining high availability?
  4. How do you implement distributed transactions across multiple containers?
  5. How do you design Cosmos DB for AI/ML pipelines?
  6. How do you optimize Cosmos DB for microservices architecture?
  7. How do you implement cross-region failover testing?
  8. How do you monitor Cosmos DB at enterprise scale?
  9. How do you handle disaster recovery in Cosmos DB?
  10. How do you implement schema-less data modeling best practices?
  11. How do you optimize Cosmos DB queries for heavy analytical workloads?
  12. How do you integrate Cosmos DB with Azure Event Hub and Functions?
  13. How do you implement real-time streaming using Cosmos DB change feed?
  14. How do you implement vector search in Cosmos DB?
  15. How do you manage RU sharing across multiple applications?
  16. How do you implement advanced security policies for sensitive data?
  17. How do you use Cosmos DB with Synapse Analytics for BI reporting?
  18. How do you implement caching strategies with Cosmos DB?
  19. How do you handle eventual consistency in critical applications?
  20. How do you implement cross-region data synchronization?
  21. How do you optimize Cosmos DB for hybrid cloud scenarios?
  22. How do you monitor and tune multi-master write conflicts?
  23. How do you design Cosmos DB for high-frequency IoT ingestion?
  24. How do you implement AI-based recommendations using Cosmos DB?
  25. What are emerging features and best practices for future-proof Cosmos DB architecture?

Related Topics


25 May 2024

#SQL_Server

#SQL_Server

Key Concepts


S.No Topic Sub-Topics
1 Introduction to Databases What is a database?, DBMS vs RDBMS, Types of databases, Use cases, Advantages
2 Database Architecture Three-tier architecture, Client-server model, Relational model, NoSQL model, Distributed databases
3 SQL Basics Data types, SELECT queries, WHERE clause, ORDER BY, GROUP BY
4 Data Definition Language (DDL) CREATE, ALTER, DROP, TRUNCATE, Constraints
5 Data Manipulation Language (DML) INSERT, UPDATE, DELETE, MERGE, Transactions
6 Data Control Language (DCL) GRANT, REVOKE, Privileges, Roles, Security
7 Transaction Management ACID properties, Commit, Rollback, Savepoints, Isolation levels
8 Indexes Primary index, Unique index, Composite index, Full-text index, Indexing strategies
9 Joins INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL OUTER JOIN, Self join
10 Subqueries Single-row subqueries, Multi-row subqueries, Correlated subqueries, EXISTS, IN
11 Views Creating views, Updating views, Materialized views, Security, Use cases
12 Stored Procedures Creating procedures, Parameters, Control statements, Error handling, Best practices
13 Functions Scalar functions, Aggregate functions, User-defined functions, System functions, Usage examples
14 Triggers BEFORE triggers, AFTER triggers, INSTEAD OF triggers, Event types, Use cases
15 Normalization 1NF, 2NF, 3NF, BCNF, Denormalization
16 Database Design ER diagrams, Tables and relationships, Keys, Constraints, Schema design best practices
17 Backup & Recovery Full backup, Incremental backup, Point-in-time recovery, Recovery strategies, Tools
18 Performance Tuning Query optimization, Index tuning, Execution plans, Caching, Monitoring tools
19 Replication Master-slave replication, Multi-master replication, Synchronous vs asynchronous, Failover, Use cases
20 Sharding & Partitioning Horizontal partitioning, Vertical partitioning, Range-based sharding, Hash-based sharding, Load balancing
21 NoSQL Databases Document store, Key-value store, Column-family store, Graph database, Use cases
22 MongoDB Basics Documents, Collections, CRUD operations, Indexing, Aggregation framework
23 Redis Basics Key-value data, Data types, Persistence, Pub/Sub, Use cases
24 Database Security Authentication, Authorization, Roles, Encryption, Auditing
25 Concurrency Control Locks, Deadlocks, Optimistic concurrency, Pessimistic concurrency, Isolation levels
26 Data Warehousing OLAP vs OLTP, Star schema, Snowflake schema, ETL process, Tools
27 Big Data Integration Hadoop, Spark, Hive, Data lakes, ETL pipelines
28 Database Testing Unit testing, Integration testing, Performance testing, Security testing, Automation tools
29 Cloud Databases AWS RDS, Azure SQL Database, Google Cloud SQL, MongoDB Atlas, Benefits
30 Database Projects & Labs ER modeling project, CRUD project, Aggregation project, Replication/sharding lab, Cloud deployment lab

Interview question

Basic Level

  1. What is SQL Server and how does it differ from other RDBMS?
  2. What are the main editions of SQL Server?
  3. How do you install SQL Server?
  4. What is SQL Server Management Studio (SSMS)?
  5. What are databases, tables, and schemas in SQL Server?
  6. How do you create a database in SQL Server?
  7. How do you create a table in SQL Server?
  8. What are the different data types in SQL Server?
  9. What is a primary key? How do you define it in SQL Server?
  10. What is a foreign key? How do you define it in SQL Server?
  11. What is the difference between CHAR, VARCHAR, and NVARCHAR?
  12. How do you insert data into a table?
  13. How do you update and delete records in SQL Server?
  14. What is the difference between DELETE, TRUNCATE, and DROP?
  15. What are constraints in SQL Server? Name a few types.
  16. How do you create indexes in SQL Server?
  17. What is a clustered index? How does it differ from a non-clustered index?
  18. How do you check the structure of a table in SQL Server?
  19. How do you retrieve all databases on a SQL Server instance?
  20. What is the difference between UNION and UNION ALL?
  21. How do you filter data using the WHERE clause?
  22. Explain the difference between INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN.
  23. What is the purpose of the TOP keyword in SQL Server?
  24. What is IDENTITY in SQL Server? How is it used?
  25. How do you back up and restore a SQL Server database?

Intermediate Level

  1. What are SQL Server system databases?
  2. Explain the purpose of master, msdb, model, and tempdb.
  3. What is tempdb used for?
  4. Explain the difference between a view and a materialized view.
  5. What are stored procedures in SQL Server?
  6. How do you create and execute a stored procedure?
  7. What are triggers in SQL Server?
  8. Explain the difference between AFTER and INSTEAD OF triggers.
  9. What are functions in SQL Server? Differentiate between scalar and table-valued functions.
  10. What is a common table expression (CTE)?
  11. How do you implement recursive queries in SQL Server?
  12. What are transactions in SQL Server?
  13. Explain ACID properties in SQL Server.
  14. What is the difference between COMMIT and ROLLBACK?
  15. How does SQL Server handle concurrency?
  16. What are isolation levels in SQL Server? List them.
  17. What is the difference between optimistic and pessimistic concurrency control?
  18. How do you use the EXCEPT and INTERSECT operators?
  19. What are SQL Server Operators like LIKE, BETWEEN, IN, and EXISTS?
  20. What is the CASE statement in SQL Server?
  21. How do you handle NULL values in SQL Server?
  22. What is the difference between ISNULL() and COALESCE()?
  23. How do you grant and revoke permissions in SQL Server?
  24. What are SQL Server logins and users? How do they differ?
  25. What is the SQL Server Agent? What is it used for?

Advanced Level

  1. What is indexing strategy in SQL Server?
  2. What are included columns in a non-clustered index?
  3. What is a filtered index in SQL Server?
  4. What are indexed views in SQL Server?
  5. What are statistics in SQL Server? Why are they important?
  6. How does SQL Server query optimizer work?
  7. What is the execution plan in SQL Server? How do you read it?
  8. What is parameter sniffing in SQL Server?
  9. How do you avoid parameter sniffing issues?
  10. What is a deadlock in SQL Server? How do you resolve it?
  11. How do you detect blocking in SQL Server?
  12. Explain difference between NOLOCK and other table hints.
  13. What is sp_who2 used for?
  14. How do you find the longest-running queries in SQL Server?
  15. What are Dynamic Management Views (DMVs)?
  16. How do you monitor performance using DMVs?
  17. What is partitioning in SQL Server?
  18. What are partitioned tables and partitioned indexes?
  19. What is replication in SQL Server? Types?
  20. What is the difference between snapshot, transactional, and merge replication?
  21. What is log shipping in SQL Server?
  22. What is database mirroring in SQL Server?
  23. What is AlwaysOn Availability Groups in SQL Server?
  24. How do you configure failover clustering in SQL Server?
  25. What is database sharding? Is it supported in SQL Server?

Expert Level

  1. Explain SQL Server architecture (SQL OS, storage engine, relational engine).
  2. What is the difference between SQL Server on-premises and Azure SQL Database?
  3. What are extended events in SQL Server?
  4. What is SQL Profiler? Why is it deprecated?
  5. How do you capture deadlock graphs in SQL Server?
  6. Explain tempdb contention and how to resolve it.
  7. How do you tune queries in SQL Server?
  8. What is Query Store in SQL Server?
  9. How do you use Query Store for performance troubleshooting?
  10. What are columnstore indexes? When should you use them?
  11. What is in-memory OLTP in SQL Server?
  12. How does SQL Server handle encryption (TDE, Always Encrypted)?
  13. What is row-level security (RLS) in SQL Server?
  14. What are dynamic data masking techniques in SQL Server?
  15. Explain PolyBase in SQL Server.
  16. How do you connect SQL Server to external data sources (linked servers)?
  17. What is Service Broker in SQL Server?
  18. What is Change Data Capture (CDC)?
  19. What is Change Tracking in SQL Server?
  20. What is the difference between CDC and Change Tracking?
  21. How do you implement auditing in SQL Server?
  22. What are best practices for SQL Server index maintenance?
  23. How do you configure high availability and disaster recovery (HADR)?
  24. What is the difference between synchronous and asynchronous replication in SQL Server?
  25. Compare SQL Server with PostgreSQL and Oracle in terms of scalability, features, and use cases.


Related Topics


   Index   
   Views   
   Stored Procedures   

12 November 2020

#Postgresql

#PostgreSql

Key Concepts


S.No Topic Sub-Topics
1 Introduction to PostgreSQL What is PostgreSQL?, Features, Advantages, Use cases, Editions
2 Installation & Setup Installing on Windows/Linux/Mac, Configuration, pgAdmin setup, Connecting to DB, Environment setup
3 PostgreSQL Architecture Processes, Memory management, Storage architecture, WAL, Transaction management
4 Databases, Schemas, and Tables Creating databases, Schemas overview, Creating tables, Table types, Best practices
5 Data Types Numeric, Character, Boolean, Date/Time, JSON/JSONB
6 Constraints Primary key, Foreign key, Unique, Not null, Check constraints
7 SQL Basics SELECT statements, WHERE clause, ORDER BY, GROUP BY, LIMIT/OFFSET
8 Joins INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL OUTER JOIN, Self join
9 Subqueries Single-row, Multi-row, Correlated subqueries, EXISTS, IN clause
10 Views Creating views, Materialized views, Updating views, Security, Performance considerations
11 Indexes B-Tree, Hash, GIN, GiST, BRIN
12 Sequences Creating sequences, Using in tables, nextval, currval, Sequence options
13 Transactions BEGIN, COMMIT, ROLLBACK, Savepoints, Isolation levels
14 Stored Procedures Creating functions, PL/pgSQL, Parameters, RETURN values, Error handling
15 Triggers Trigger types, BEFORE/AFTER triggers, Row-level, Statement-level, Trigger functions
16 Data Import & Export psql COPY command, pg_dump, pg_restore, CSV import/export, Data migration
17 Full Text Search tsvector, tsquery, Indexing, Ranking, Search functions
18 JSON & JSONB Storing JSON, JSONB vs JSON, Querying JSON, Indexing JSONB, Functions & operators
19 Partitioning Range partitioning, List partitioning, Hash partitioning, Creating partitions, Performance benefits
20 Replication Streaming replication, Synchronous vs asynchronous, Hot standby, Failover, Configuration
21 Backup & Recovery pg_dump, pg_restore, Continuous archiving, PITR, Best practices
22 Performance Tuning Query optimization, EXPLAIN, Index tuning, VACUUM & ANALYZE, Connection pooling
23 Security Authentication, Roles & privileges, GRANT & REVOKE, SSL/TLS, Row-level security
24 Monitoring pg_stat_activity, Logging, Performance metrics, Tools (pgAdmin, Grafana), Alerts
25 Extensions PostGIS, pg_trgm, citext, hstore, Custom extensions
26 Advanced Queries Window functions, CTEs, Recursive queries, Set-returning functions, Advanced joins
27 Database Design ER modeling, Normalization, Denormalization, Index strategy, Schema best practices
28 Cloud PostgreSQL AWS RDS, Google Cloud SQL, Azure Database, Cloud backups, Scaling options
29 Testing & Mocking Unit testing with SQL, Integration testing, Test data setup, pgTAP, Mock databases
30 Projects & Certification Hands-on CRUD project, Performance tuning lab, Replication lab, Cloud deployment project, Certification prep

Interview question

Basic Level

  1. What is PostgreSQL and how is it different from other RDBMS like MySQL or Oracle?
  2. What are the main features of PostgreSQL?
  3. Explain the architecture of PostgreSQL.
  4. How do you install PostgreSQL on Linux and Windows?
  5. What is psql in PostgreSQL?
  6. How do you create a new database in PostgreSQL?
  7. How do you list all databases in PostgreSQL?
  8. What are schemas in PostgreSQL?
  9. How do you connect to a PostgreSQL database using psql?
  10. Explain the difference between CHAR, VARCHAR, and TEXT in PostgreSQL.
  11. How do you create a table in PostgreSQL?
  12. What are the different data types available in PostgreSQL?
  13. How do you insert data into a PostgreSQL table?
  14. How do you update and delete data in PostgreSQL?
  15. What are sequences in PostgreSQL?
  16. How do you create a sequence in PostgreSQL?
  17. What is a primary key in PostgreSQL?
  18. How do you define a foreign key in PostgreSQL?
  19. What are indexes in PostgreSQL?
  20. How do you create an index in PostgreSQL?
  21. What is the difference between DELETE and TRUNCATE?
  22. What is the purpose of the RETURNING clause in PostgreSQL?
  23. How do you enable case-insensitive search in PostgreSQL?
  24. Explain the difference between NULL and an empty string.
  25. How do you backup and restore a PostgreSQL database?

Intermediate Level

  1. What are PostgreSQL system catalogs?
  2. How does PostgreSQL handle transactions?
  3. Explain the concept of MVCC (Multi-Version Concurrency Control).
  4. What is the difference between COMMIT and ROLLBACK?
  5. How do you implement foreign key constraints with cascading actions?
  6. What is a materialized view in PostgreSQL?
  7. How do you refresh a materialized view?
  8. Explain the difference between VIEW and MATERIALIZED VIEW.
  9. What are window functions in PostgreSQL?
  10. How do you use ROW_NUMBER(), RANK(), and DENSE_RANK()?
  11. What are PostgreSQL extensions? Give examples.
  12. What is the pgAdmin tool used for?
  13. How do you monitor queries in PostgreSQL?
  14. What is the EXPLAIN command used for?
  15. How do you optimize queries in PostgreSQL?
  16. Explain the difference between INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN.
  17. How do you implement recursive queries in PostgreSQL?
  18. What is the difference between NOW() and CURRENT_DATE?
  19. Explain COALESCE() function in PostgreSQL.
  20. How do you use JSON and JSONB data types in PostgreSQL?
  21. How do you create and query an array column in PostgreSQL?
  22. What are PostgreSQL operators for pattern matching?
  23. Explain IS DISTINCT FROM operator in PostgreSQL.
  24. How do you grant and revoke privileges in PostgreSQL?
  25. What is the role of pg_hba.conf?

Advanced Level

  1. Explain Write-Ahead Logging (WAL) in PostgreSQL.
  2. How does PostgreSQL ensure data consistency?
  3. What are the different types of indexes in PostgreSQL?
  4. When should you use GIN vs BTREE indexes?
  5. Explain Partial Indexes in PostgreSQL.
  6. What is a covering index in PostgreSQL?
  7. How do you implement full-text search in PostgreSQL?
  8. Explain the difference between TO_CHAR() and TO_DATE().
  9. How does PostgreSQL handle concurrency and locking?
  10. What are advisory locks in PostgreSQL?
  11. How does VACUUM work in PostgreSQL?
  12. What is the difference between VACUUM and VACUUM FULL?
  13. What is ANALYZE used for?
  14. How does PostgreSQL query planner work?
  15. What are parallel queries in PostgreSQL?
  16. Explain logical vs physical replication.
  17. How do you configure replication in PostgreSQL?
  18. What are hot standby servers in PostgreSQL?
  19. Explain Point-In-Time Recovery (PITR) in PostgreSQL.
  20. How do you implement partitioning in PostgreSQL?
  21. Explain the difference between range and list partitioning.
  22. What is a foreign data wrapper (FDW)?
  23. How do you connect PostgreSQL with other databases using FDW?
  24. What are stored procedures in PostgreSQL?
  25. How do you write PL/pgSQL functions?

Expert Level

  1. Explain PostgreSQL?s process architecture (postmaster, background workers, autovacuum).
  2. How do you handle deadlocks in PostgreSQL?
  3. What strategies can be used for PostgreSQL performance tuning?
  4. How do you tune work_mem, shared_buffers, and effective_cache_size?
  5. What are PostgreSQL tablespaces?
  6. How do you create and use a tablespace?
  7. What is sharding in PostgreSQL? How can it be implemented?
  8. How does PostgreSQL differ from distributed databases like CockroachDB or Citus?
  9. What is the difference between synchronous and asynchronous replication?
  10. How do you set up synchronous replication?
  11. How do you monitor replication lag in PostgreSQL?
  12. How do you implement high availability (HA) in PostgreSQL?
  13. Explain connection pooling in PostgreSQL.
  14. What is PgBouncer and how is it used?
  15. How do you implement partition pruning in PostgreSQL?
  16. Explain JIT (Just-In-Time) compilation in PostgreSQL.
  17. How do you debug performance issues in PostgreSQL queries?
  18. What are generated columns in PostgreSQL?
  19. How do you implement Row-Level Security (RLS)?
  20. How do you use event triggers in PostgreSQL?
  21. Explain logical decoding in PostgreSQL.
  22. What is WAL archiving and how is it configured?
  23. How does PostgreSQL handle large objects (LOBs)?
  24. What are common PostgreSQL anti-patterns to avoid?
  25. Compare PostgreSQL with NoSQL databases in terms of scalability and flexibility.

Related Topics


08 November 2020

#Hibernate

#Hibernate

Key Concepts


S.No Topic Sub-Topics
1 Introduction to Hibernate What is Hibernate?, Features, Advantages, ORM concept, Use cases
2 Hibernate Architecture Configuration, SessionFactory, Session, Transaction, Query Interface
3 Environment Setup Hibernate installation, IDE setup, Database setup, Maven/Gradle dependencies, Configuration files
4 Hibernate Configuration hibernate.cfg.xml, hibernate.properties, DataSource configuration, Dialects, Connection pooling
5 Entity Mapping @Entity annotation, @Table annotation, @Id annotation, @Column annotation, Mapping strategies
6 Primary Key Generation IDENTITY, SEQUENCE, TABLE, AUTO, Custom generators
7 Hibernate Session Opening session, Closing session, SessionFactory, Session methods, Best practices
8 CRUD Operations Save, Update, Delete, Load, Get
9 Hibernate Query Language (HQL) Basics of HQL, SELECT queries, WHERE clause, JOINs, Aggregation functions
10 Criteria API Creating Criteria, Restrictions, Projections, Ordering, Pagination
11 Native SQL Queries Executing SQL, Result mapping, Named queries, Parameters, Pagination
12 Associations in Hibernate One-to-One, One-to-Many, Many-to-One, Many-to-Many, Mapping strategies
13 Collection Mapping List, Set, Map, Bag, Array mapping
14 Inheritance Mapping Single Table strategy, Table per Class strategy, Joined strategy, Discriminator column, Annotations
15 Component Mapping Embedded objects, @Embeddable, @Embedded annotation, Reusability, Nested components
16 Hibernate Caching First-level cache, Second-level cache, Query cache, Cache providers, Configuration
17 Hibernate Transactions Transaction API, ACID properties, Commit, Rollback, Transaction propagation
18 Lazy vs Eager Loading Lazy loading, Eager loading, FetchType, Performance impact, Use cases
19 Hibernate Event Listeners PreInsert, PostInsert, PreUpdate, PostUpdate, Configuration
20 Hibernate Interceptors Session interceptor, Methods, Custom interceptors, Performance, Use cases
21 Hibernate Validator Bean validation, @NotNull, @Size, Custom constraints, Integration
22 Hibernate Filters Defining filters, Enabling filters, Parameters, Dynamic filtering, Use cases
23 Named Queries Defining queries, Using @NamedQuery, Using @NamedNativeQuery, Parameters, Reusability
24 Batch Processing Bulk insert, Bulk update, Stateless session, JDBC batch, Performance optimization
25 Optimistic & Pessimistic Locking Optimistic locking, Pessimistic locking, Versioning, Lock modes, Concurrency control
26 Hibernate with Spring Spring ORM, SessionFactory integration, Transaction management, DAO pattern, Configuration
27 Performance Tuning Query optimization, Fetch strategies, Caching strategies, Connection pooling, Monitoring tools
28 Logging & Monitoring Hibernate logging, SQL logging, Statistics, JMX monitoring, Tools
29 Projects & Hands-on Labs CRUD project, Association mapping project, Inheritance mapping project, Caching project, Spring integration project
30 Certification & Career Path Hibernate certification, Job roles, Learning resources, Real-time projects, Best practices

Interview question

Basic

  1. What is Hibernate?
  2. Difference between Hibernate and JDBC?
  3. What are the advantages of Hibernate ORM?
  4. What is JPA and how is it related to Hibernate?
  5. Explain ORM in simple terms.
  6. What is the role of hibernate.cfg.xml?
  7. What is the use of SessionFactory?
  8. What is the difference between Session and SessionFactory?
  9. Explain the lifecycle of a Hibernate Session.
  10. What are persistent objects in Hibernate?
  11. What is the difference between transient, persistent, and detached objects?
  12. Explain the role of @Entity annotation.
  13. How do you map a table to a class in Hibernate?
  14. What is @Id and @GeneratedValue annotation used for?
  15. How do you configure database connection in Hibernate?
  16. What is Hibernate Dialect?
  17. Explain HQL (Hibernate Query Language).
  18. What is the difference between HQL and SQL?
  19. How do you perform CRUD operations in Hibernate?
  20. What is the default fetching strategy in Hibernate?
  21. Difference between get() and load() methods?
  22. What are named queries in Hibernate?
  23. Explain the role of @Table annotation.
  24. What is the use of hibernate.properties file?
  25. Explain the difference between save(), persist(), and saveOrUpdate().

Intermediate

  1. What are the different types of entity mapping in Hibernate?
  2. How do you implement one-to-one mapping in Hibernate?
  3. How do you implement one-to-many mapping in Hibernate?
  4. How do you implement many-to-many mapping in Hibernate?
  5. Explain cascading in Hibernate.
  6. What is lazy loading in Hibernate?
  7. Difference between lazy and eager fetching?
  8. What is the N+1 select problem?
  9. How to solve N+1 problem in Hibernate?
  10. What are embedded objects in Hibernate?
  11. Explain inheritance mapping strategies in Hibernate.
  12. Difference between Single Table and Joined strategy?
  13. How do you configure table per class hierarchy?
  14. What is the role of @Inheritance annotation?
  15. Explain the role of @MappedSuperclass.
  16. What are Hibernate annotations used for composite keys?
  17. How do you handle versioning in Hibernate?
  18. Explain optimistic and pessimistic locking.
  19. What is Hibernate Criteria API?
  20. Difference between HQL and Criteria API?
  21. What are projections in Criteria API?
  22. How do you add restrictions in Criteria API?
  23. What is the use of CriteriaBuilder in JPA?
  24. How do you perform pagination in Hibernate?
  25. Difference between Query, TypedQuery, and CriteriaQuery?

Advanced

  1. What is the role of Session.flush()?
  2. What is the difference between flush() and commit()?
  3. Explain clear() and evict() methods.
  4. How do you detach an entity in Hibernate?
  5. What is the use of merge() in Hibernate?
  6. What is the difference between merge() and update()?
  7. What is the first-level cache in Hibernate?
  8. What is the second-level cache in Hibernate?
  9. What cache providers can be used with Hibernate?
  10. What is query-level cache in Hibernate?
  11. How do you configure Ehcache in Hibernate?
  12. Explain Hibernate?s integration with Spring.
  13. What is the role of LocalSessionFactoryBean in Spring?
  14. How do you configure transaction management in Spring + Hibernate?
  15. Difference between programmatic and declarative transactions?
  16. What are Interceptors in Hibernate?
  17. Difference between Interceptor and EventListener?
  18. Explain entity lifecycle events in Hibernate.
  19. How do you use Hibernate with stored procedures?
  20. How do you map native SQL queries in Hibernate?
  21. What are named native queries?
  22. How do you log SQL queries in Hibernate?
  23. Explain batch processing in Hibernate.
  24. How do you configure batch size in Hibernate?
  25. What is StatelessSession in Hibernate?

Expert

  1. What are best practices for Hibernate performance tuning?
  2. How do you optimize Hibernate for large datasets?
  3. How do you use Fetch Joins in Hibernate?
  4. Explain DTO projection using Hibernate.
  5. What is Hibernate Validator and how is it used?
  6. What is JSR-303 Bean Validation in Hibernate?
  7. How do you configure custom validators in Hibernate?
  8. What is a proxy object in Hibernate?
  9. What are bytecode enhancement techniques in Hibernate?
  10. Explain dirty checking in Hibernate.
  11. How does Hibernate detect changes in entities?
  12. What is Hibernate Envers?
  13. How do you implement auditing in Hibernate?
  14. Explain multi-tenancy support in Hibernate.
  15. Difference between schema, database, and discriminator-based multi-tenancy?
  16. How does Hibernate integrate with NoSQL databases?
  17. What is Hibernate OGM?
  18. Explain Hibernate Search and its use cases.
  19. How does Hibernate integrate with Elasticsearch?
  20. Explain polyglot persistence with Hibernate.
  21. How do you handle migration and versioning with Hibernate?
  22. How do you integrate Hibernate with Flyway or Liquibase?
  23. How do you debug Hibernate performance issues?
  24. How does Hibernate differ from JPA, MyBatis, and EclipseLink?
  25. Future of Hibernate: How does it fit into modern microservices and cloud-native architectures?

Related Topics


03 November 2020

#Redis

#Redis

Key Concepts


S.No Topic Sub-Topics
1 Introduction to Redis What is Redis?, Features, Use cases, Advantages, Key differences with other NoSQL DBs
2 Redis Architecture In-memory database, Single-threaded model, Persistence, Replication, Pub/Sub mechanism
3 Installation & Setup Installing on Linux/Windows/Mac, Configuration file, Starting Redis server, Redis CLI, Connecting clients
4 Data Types Overview Strings, Lists, Sets, Sorted Sets, Hashes
5 String Operations SET, GET, INCR, DECR, MGET/MSET
6 List Operations LPUSH, RPUSH, LPOP, RPOP, LRANGE
7 Set Operations SADD, SREM, SMEMBERS, SISMEMBER, SUNION/SINTER/SDIFF
8 Sorted Set Operations ZADD, ZREM, ZRANGE, ZREVRANGE, ZSCORE
9 Hash Operations HSET, HGET, HGETALL, HDEL, HEXISTS
10 Keys Management EXPIRE, TTL, PERSIST, DEL, RENAME
11 Persistence in Redis RDB snapshots, AOF (Append Only File), Hybrid persistence, Save configuration, Recovery
12 Redis Transactions MULTI, EXEC, DISCARD, WATCH, UNWATCH
13 Redis Pub/Sub PUBLISH, SUBSCRIBE, PSUBSCRIBE, UNSUBSCRIBE, Message patterns
14 Redis Lua Scripting Evaluating scripts, KEYS & ARGV, Atomic operations, EVALSHA, Best practices
15 Redis Cluster Sharding, Node types, Slot allocation, Cluster commands, High availability
16 Replication Master-slave setup, Asynchronous replication, Failover, Read scalability, Configuration
17 Redis Sentinel Monitoring, Automatic failover, Notification, Sentinel configuration, HA setup
18 Memory Management Max memory, Eviction policies, LRU/LFU, Fragmentation, Memory optimization
19 Performance Tuning Command optimization, Pipelining, Connection pooling, Latency monitoring, Benchmarking
20 Redis Modules RedisJSON, RediSearch, RedisGraph, RedisTimeSeries, Module integration
21 Redis Streams Creating streams, XADD, XREAD, XGROUP, Consumer groups
22 Redis Geo GEOADD, GEOPOS, GEODIST, GEORADIUS, GEOSEARCH
23 Redis Bitmaps SETBIT, GETBIT, BITCOUNT, BITOP, Use cases
24 Redis HyperLogLog PFADD, PFCOUNT, PFMERGE, Cardinality estimation, Use cases
25 Redis Key Expiration Strategies TTL monitoring, Key eviction, Lazy deletion, Active expiration, Best practices
26 Security & Authentication Password authentication, ACLs, TLS/SSL, IP whitelisting, Redis configuration
27 Monitoring & Logging Redis INFO, Slowlog, MONITOR command, Metrics, Integration with Prometheus
28 Backup & Recovery RDB snapshots, AOF rewrite, Disaster recovery, Manual backup, Cloud backup
29 Redis in Microservices Cache pattern, Session management, Message broker, Leaderboards, Real-time analytics
30 Projects & Labs CRUD with Redis, Pub/Sub project, Cache integration, Streams project, Cluster deployment project

Interview question

📘 Basic Level

  1. What is Redis and what are its key features?
  2. What is the difference between Redis and traditional RDBMS?
  3. What data structures are supported by Redis?
  4. What is an in-memory database?
  5. How do you install Redis on Linux/Windows?
  6. What is Redis CLI and how is it used?
  7. How do you set and get a key-value pair in Redis?
  8. What commands are used to delete keys?
  9. How do you check if a key exists in Redis?
  10. What is the difference between GET and MGET commands?
  11. What is the difference between SET and MSET commands?
  12. How do you increment or decrement a numeric value in Redis?
  13. How do you view all keys in Redis?
  14. What is TTL in Redis?
  15. How do you set an expiration for a key?
  16. What happens when a key expires?
  17. What is the difference between DEL and UNLINK?
  18. What is the difference between a string and hash in Redis?
  19. How do you store a list in Redis?
  20. How do you retrieve elements from a list?
  21. What is a set in Redis?
  22. How do you add and remove members from a set?
  23. What is a sorted set and how is it different from a set?
  24. What is the Redis default port?
  25. What are the persistence options in Redis?

📗 Intermediate Level

  1. What is RDB persistence and how does it work?
  2. What is AOF persistence and how does it work?
  3. What is the difference between RDB and AOF?
  4. How do you configure Redis persistence in redis.conf?
  5. What is a Redis transaction?
  6. What are the MULTI, EXEC, and WATCH commands?
  7. How do you execute Lua scripts in Redis?
  8. What is Redis pub/sub and how does it work?
  9. How do you subscribe to a channel?
  10. How do you publish a message to a channel?
  11. What is Redis replication?
  12. What is a master and a replica node in Redis?
  13. How do replicas synchronize with the master?
  14. What is Redis Sentinel?
  15. How does Sentinel handle failover?
  16. What are Redis eviction policies?
  17. What is LRU and LFU eviction policy?
  18. How do you monitor Redis performance?
  19. What are Redis slow logs and how do you use them?
  20. What is pipelining in Redis?
  21. How do you optimize Redis queries using pipelining?
  22. What is the difference between blocking and non-blocking commands?
  23. How do you manage memory usage in Redis?
  24. How do you flush all keys from a database?
  25. How do you monitor Redis memory usage?

📕 Advanced Level

  1. What is Redis clustering?
  2. How do Redis hash slots work?
  3. How do you add a node to a Redis cluster?
  4. How do you remove a node from a Redis cluster?
  5. What is key sharding in Redis?
  6. How does Redis handle rebalancing data across nodes?
  7. How do you implement high availability in Redis?
  8. How do Redis clusters handle failover?
  9. What is Redis sentinel monitoring architecture?
  10. How do you configure client read/write preferences in Redis clusters?
  11. What is Redis Streams?
  12. How do consumer groups work in Redis Streams?
  13. What is XREAD and XREADGROUP?
  14. How do you manage offsets in Redis Streams?
  15. How do Redis hyperloglogs work?
  16. How do you implement approximate counting with HyperLogLog?
  17. What is Redis Bitmaps and how is it used?
  18. What are Redis geospatial indexes?
  19. How do you perform geospatial queries in Redis?
  20. How does Redis handle large datasets in memory?
  21. What are the best practices for memory optimization in Redis?
  22. How do Redis modules extend functionality?
  23. What is RedisJSON?
  24. What is RediSearch and how is it used?
  25. How does Redis handle atomic operations with Lua scripts?

📓 Expert Level

  1. How do you design a Redis architecture for high-concurrency workloads?
  2. How do you design Redis for multi-region replication?
  3. How do you handle failover in distributed Redis systems?
  4. How do you tune Redis performance for low latency?
  5. How do you index Redis data for analytics queries?
  6. How do you monitor Redis clusters at scale?
  7. How do you handle Redis memory fragmentation?
  8. How do you configure Redis for persistence in cloud environments?
  9. How do you design Redis caching strategies for large applications?
  10. How do you use Redis with Kubernetes?
  11. How do Redis pipelining and transactions differ in high load?
  12. How do you implement distributed locks in Redis?
  13. How do you design Redis for session management at scale?
  14. How do you implement rate limiting using Redis?
  15. How do you secure Redis in production?
  16. How do you use ACLs in Redis 6+?
  17. How do you perform real-time analytics using Redis Streams?
  18. How do Redis Vector Search and AI modules work?
  19. How do you plan disaster recovery for Redis clusters?
  20. How do you migrate data between Redis clusters?
  21. How do you handle schema evolution in Redis?
  22. How do you implement multi-tenancy in Redis?
  23. How do you integrate Redis with machine learning pipelines?
  24. How do you optimize Redis for microservices architectures?
  25. What are emerging trends in Redis, such as Redis Stack and AI integration?

Related Topics


   Data Types   
   Redis Persistence Mechanisms   
   Replication   
   Cluster   
   Sharding   
   Memory Management   
   Eviction Policies   
   Pub/Sub & Streams   

#Mongodb

#MongoDB

Key Concepts


S.No Topic Sub-Topics
1 Introduction to MongoDB What is MongoDB?, NoSQL vs SQL, Use cases, Features, Advantages
2 MongoDB Architecture Documents, Collections, Databases, Replica sets, Sharding
3 Installation & Setup Installing MongoDB, Configuration, Mongo Shell, Compass GUI, Connecting to DB
4 CRUD Operations Insert, Find, Update, Delete, Bulk operations
5 Data Modeling Schema design, Embedding vs Referencing, Data types, Indexing strategies, Best practices
6 Indexes Single field index, Compound index, Unique index, TTL index, Text index
7 Aggregation Framework $match, $group, $project, $sort, $lookup
8 Data Validation Schema validation, Validation rules, Validators, Error handling, Update validation
9 MongoDB Security Authentication, Authorization, Role-based access, SSL/TLS, Auditing
10 Replication Replica set overview, Primary/Secondary, Failover, Election, Oplog
11 Sharding Sharding overview, Shard key, Config servers, Mongos, Balancing
12 Transactions Single document transactions, Multi-document transactions, Commit, Rollback, Best practices
13 MongoDB Backup & Restore mongodump, mongorestore, Cloud backups, Point-in-time restore, Scheduling backups
14 Monitoring & Performance Monitoring tools, Profiling, Query optimization, Index usage, Metrics
15 MongoDB Atlas Overview, Cluster setup, Security settings, Monitoring, Deployment options
16 Cloud Deployment AWS deployment, Azure deployment, GCP deployment, Atlas automation, Scaling
17 Aggregation Pipelines Advanced $facet, $bucket, $unwind, $replaceRoot, $graphLookup
18 Change Streams Real-time monitoring, Watch collections, Watch databases, Resume tokens, Integration
19 GridFS Storing large files, Chunking, Retrieving files, File metadata, Integration
20 MongoDB Drivers Java driver, Python driver, Node.js driver, CRUD operations, Connection management
21 Full Text Search Text index, Search queries, Scoring, Language support, Aggregation with search
22 TTL Collections Time-to-live index, Automatic deletion, Use cases, Monitoring, Best practices
23 Data Migration mongodump/mongorestore, mongoimport/mongoexport, Live migration, Schema mapping, Validation
24 MongoDB & Microservices Integration patterns, Database per service, Event sourcing, CQRS, Scaling
25 MongoDB & Big Data Integration with Spark, Hadoop connector, Analytics pipelines, Data lakes, ETL processes
26 MongoDB Caching In-memory storage, Redis integration, Query caching, Index optimization, TTL cache
27 Testing & Mocking Unit tests, Integration tests, Mocking MongoDB, Test containers, Data cleanup
28 Backup & Disaster Recovery Automated backups, Point-in-time recovery, Sharded cluster recovery, Replica set recovery, Testing DR
29 MongoDB Projects & Labs Hands-on CRUD project, Aggregation project, Replica set project, Sharding project, Atlas deployment project
30 Certification & Career Path MongoDB University, Developer certification, DBA certification, Real-time projects, Job opportunities

Interview question

Basic Level

  1. What is MongoDB and how does it differ from traditional RDBMS?
  2. What are the key features of MongoDB?
  3. Explain the concept of a document in MongoDB.
  4. What is a collection in MongoDB?
  5. How does MongoDB store data internally?
  6. What are BSON documents?
  7. How do you create a database in MongoDB?
  8. How do you create a collection in MongoDB?
  9. How do you insert a document into a collection?
  10. What is the difference between insertOne() and insertMany()?
  11. How do you update a document in MongoDB?
  12. What is the difference between updateOne() and updateMany()?
  13. How do you delete a document from MongoDB?
  14. What is the difference between deleteOne() and deleteMany()?
  15. How do you query data in MongoDB?
  16. What is the difference between find() and findOne()?
  17. How do you use comparison operators in MongoDB queries?
  18. What are logical operators in MongoDB? Give examples.
  19. How do you sort query results in MongoDB?
  20. How do you limit and skip documents in MongoDB queries?
  21. What is the difference between schema in RDBMS and MongoDB?
  22. What are capped collections in MongoDB?
  23. How do you create indexes in MongoDB?
  24. What is the difference between a primary key in RDBMS and _id in MongoDB?
  25. How do you perform a text search in MongoDB?

Intermediate Level

  1. What are aggregation pipelines in MongoDB?
  2. How does the $match stage work in aggregation?
  3. What is the $group stage used for in MongoDB?
  4. How do you use $project in MongoDB aggregation?
  5. What is $lookup in MongoDB?
  6. How do you perform joins in MongoDB?
  7. What is the difference between $unwind and $group?
  8. How do you implement pagination in MongoDB?
  9. What are MongoDB indexes? Why are they important?
  10. How do you create compound indexes in MongoDB?
  11. What are multikey indexes in MongoDB?
  12. What is a hashed index in MongoDB?
  13. Explain the difference between unique index and sparse index.
  14. What are geospatial indexes in MongoDB?
  15. How do you query geospatial data in MongoDB?
  16. What is the MongoDB replica set?
  17. What are the roles of primary and secondary nodes?
  18. What is an arbiter in MongoDB replication?
  19. How do you initiate a replica set?
  20. What is sharding in MongoDB?
  21. What is the role of config servers in MongoDB sharding?
  22. What is the role of mongos in MongoDB sharding?
  23. How does MongoDB choose a shard key?
  24. Explain the difference between vertical and horizontal scaling in MongoDB.
  25. What are MongoDB transactions? When would you use them?

Advanced Level

  1. Explain MongoDB?s storage engine architecture.
  2. What is the WiredTiger storage engine?
  3. How does journaling work in MongoDB?
  4. What is oplog in MongoDB?
  5. How does replication work internally in MongoDB?
  6. Explain MongoDB?s write concern.
  7. Explain MongoDB?s read concern.
  8. What is eventual consistency in MongoDB?
  9. How do you ensure strong consistency in MongoDB?
  10. What is a rollback in MongoDB replication?
  11. How does failover happen in MongoDB replica sets?
  12. What is the difference between replica set and sharding?
  13. How do you monitor MongoDB performance?
  14. What is mongostat and mongotop?
  15. What are MongoDB profiler and logs used for?
  16. How do you analyze slow queries in MongoDB?
  17. What are change streams in MongoDB?
  18. How do you use change streams for real-time applications?
  19. What are capped collections best suited for?
  20. What is GridFS in MongoDB?
  21. How do you store large files in MongoDB?
  22. What are TTL (Time-to-Live) indexes?
  23. How does MongoDB handle concurrency?
  24. What is locking in MongoDB? How does WiredTiger manage locks?
  25. What are MongoDB transactions limitations compared to RDBMS?

Expert Level

  1. Explain the internal working of MongoDB sharding.
  2. What is a chunk in MongoDB sharding?
  3. How does MongoDB balance chunks across shards?
  4. What are hotspots in MongoDB sharding? How do you avoid them?
  5. How do you migrate chunks between shards?
  6. What happens when a shard becomes unavailable?
  7. How does MongoDB handle network partitioning?
  8. What is the difference between hashed and ranged shard keys?
  9. What are best practices for choosing a shard key?
  10. Explain MongoDB distributed transactions.
  11. What is the difference between 2-phase commit and MongoDB transactions?
  12. How do you secure a MongoDB cluster?
  13. What authentication mechanisms are supported by MongoDB?
  14. What is role-based access control (RBAC) in MongoDB?
  15. How do you enable encryption in MongoDB?
  16. What is the difference between TLS/SSL encryption and encryption at rest?
  17. How do you perform backup and restore in MongoDB?
  18. What is mongodump and mongorestore?
  19. What is mongoexport and mongoimport?
  20. How do you design a schema in MongoDB for performance?
  21. What are schema design anti-patterns in MongoDB?
  22. How does MongoDB Atlas differ from on-prem MongoDB?
  23. How do you integrate MongoDB with big data tools like Spark or Hadoop?
  24. What are some common MongoDB performance tuning techniques?
  25. Compare MongoDB with SQL Server and PostgreSQL in terms of scalability and flexibility.


Related Topics