Published on

Database Design

Authors
Time yourself:
Your progress:

00:30:00

0%

Data Modeling

1. What is normalization, and why is it important in database design?

Flag important question
Mark as complete

2. Explain the difference between primary keys and foreign keys.

Flag important question
Mark as complete

3. How would you design a database for a multi-tenant application?

Flag important question
Mark as complete

4. How do you balance normalization and performance optimization in database design?

Flag important question
Mark as complete

5. How would you handle evolving schema requirements in a rapidly changing application?

Flag important question
Mark as complete

6. What are the trade-offs between relational and NoSQL databases for hierarchical data?

Flag important question
Mark as complete

Database Normalization and Denormalization

7. Explain the different normal forms (1NF, 2NF, 3NF, BCNF) with examples.

Flag important question
Mark as complete

8. When would you choose denormalization over normalization?

Flag important question
Mark as complete

9. How would you design a denormalized schema for a reporting system?

Flag important question
Mark as complete

10. What are the implications of denormalization for data consistency and query complexity?

Flag important question
Mark as complete

11. How would you design a schema that is partially normalized for both transactional and analytical workloads?

Flag important question
Mark as complete

12. How do you identify and fix transitive dependencies in a poorly designed schema?

Flag important question
Mark as complete

Indexing and Query Optimization

13. What are the different types of indexes, and how do they impact performance?

Flag important question
Mark as complete

14. How would you optimize a query with multiple joins and subqueries?

Flag important question
Mark as complete

15. When should you use composite indexes in a database?

Flag important question
Mark as complete

16. How would you design an index strategy for a table with billions of rows and high write throughput?

Flag important question
Mark as complete

17. What are the trade-offs of using full-text search indexes compared to regular indexes for text-heavy data?

Flag important question
Mark as complete

18. How would you analyze and resolve index fragmentation issues?

Flag important question
Mark as complete

Transactions and Concurrency

19. What is ACID, and how does it impact database transactions?

Flag important question
Mark as complete

20. How would you handle deadlocks in a relational database?

Flag important question
Mark as complete

21. Explain the differences between pessimistic and optimistic concurrency control.

Flag important question
Mark as complete

22. How would you design a database schema to minimize locking contention for high-concurrency systems?

Flag important question
Mark as complete

23. What are the implications of using snapshot isolation in a distributed database?

Flag important question
Mark as complete

24. How would you ensure atomicity in a multi-step transaction that spans multiple tables?

Flag important question
Mark as complete

Database Scaling and Partitioning

25. What is database sharding, and when should it be used?

Pro Content

26. How would you design a partitioning strategy for time-series data?

Pro Content

27. Explain the trade-offs between vertical and horizontal scaling.

Pro Content

28. How would you manage cross-shard joins in a sharded database?

Pro Content

29. What are the challenges of implementing consistent hashing for partitioning?

Pro Content

30. How would you design a schema to optimize read performance in a geo-distributed database?

Pro Content

Data Integrity and Constraints

31. What is the role of foreign key constraints in maintaining data integrity?

Pro Content

32. How would you enforce unique constraints across multiple columns?

Pro Content

33. Explain the difference between check constraints and triggers.

Pro Content

34. How would you handle enforcing constraints in a distributed NoSQL database that lacks built-in support?

Pro Content

35. What are the performance implications of using cascading deletes in a highly active table?

Pro Content

36. How would you implement custom validation rules that cannot be handled by built-in constraints?

Pro Content

NoSQL Database Design

37. How would you design a schema in MongoDB for a product catalog?

Pro Content

38. What are the trade-offs of using document stores over relational databases?

Pro Content

39. Explain how you would design a key-value store for high-speed lookups.

Pro Content

40. How do you model many-to-many relationships in a NoSQL database like DynamoDB?

Pro Content

41. What are the challenges of maintaining consistency in eventual-consistency NoSQL databases?

Pro Content

42. How would you design a scalable schema for a real-time chat application in Cassandra?

Pro Content

Database Security

43. How would you implement row-level security in a database?

Pro Content

44. What are the best practices for encrypting sensitive data in a database?

Pro Content

45. Explain the importance of audit logs in database security.

Pro Content

46. How would you design a multi-tenant database with tenant-specific access restrictions?

Pro Content

47. What are the trade-offs of using field-level encryption versus database-level encryption?

Pro Content

48. How would you detect and prevent SQL injection vulnerabilities in a database design?

Pro Content

Backup, Recovery, and High Availability

49. What are the differences between full, incremental, and differential backups?

Pro Content

50. How would you design a disaster recovery plan for a database system?

Pro Content

51. Explain how replication works in PostgreSQL.

Pro Content

52. How would you minimize downtime during a database failover in a globally distributed system?

Pro Content

53. What are the challenges of maintaining data consistency during a point-in-time recovery?

Pro Content

54. How would you design a schema to ensure zero data loss in a highly available system?

Pro Content