Overview
The lecture explains the differences between RDBMS (Relational Database Management Systems) and NoSQL databases, covering their characteristics, use-cases, and key decision points when choosing one for your applications.
RDBMS Overview
- RDBMS databases use tables with fixed schemas and defined relationships between data.
- Examples include Oracle, MySQL, SQL Server, and IBM DB2; they're widely used and well-documented.
- Data is accessed and managed using SQL (Structured Query Language).
- RDBMS supports ACID (Atomicity, Consistency, Isolation, Durability) transactions, ensuring data reliability and integrity.
- Ideal for applications requiring strong consistency, such as financial or enterprise systems.
- Vertical scaling (upgrading hardware) is more typical; distributed (horizontal) setups are more complex.
- Generally less cloud-ready and less distributed compared to NoSQL solutions.
NoSQL Overview
- NoSQL databases handle unstructured or semi-structured data without a fixed schema.
- Examples include MongoDB, CouchDB, Redis; these are available as cloud services with pay-as-you-go options.
- NoSQL databases are easy to deploy, cheaper to start, and support horizontal (distributed) scaling.
- Data formats include document (JSON), key-value, wide-column, and graph storage.
- Suitable for applications with rapidly changing or uncertain data structures or high scalability needs.
- Lack of enforced relationships between data increases insertion speed and flexibility.
- Choose write-intensive or read-intensive NoSQL databases based on your workload.
Key Considerations for Choosing
- Use RDBMS for complex queries, strict data consistency, and normalized data requirements.
- Use NoSQL if schema flexibility, ease of deployment, scalability, and speed are priorities.
- NoSQL is better for high workload and distributed systems; RDBMS is better for transactional accuracy.
- NoSQL simplifies scaling and is widely supported across cloud providers with low starting costs.
Key Terms & Definitions
- RDBMS — Relational Database Management System; stores data in tables with fixed schemas.
- NoSQL — A category of databases designed for unstructured or semi-structured data, without a fixed schema.
- Schema — The predefined structure of a database showing tables, columns, and data types.
- SQL — Structured Query Language, used for managing relational databases.
- ACID — Atomicity, Consistency, Isolation, Durability; properties ensuring reliable database transactions.
- Vertical Scaling — Increasing the power of a single server.
- Horizontal Scaling — Adding more servers to distribute the database workload.
Action Items / Next Steps
- Review your project requirements to decide between RDBMS and NoSQL.
- Explore cloud-based NoSQL options like MongoDB Atlas or Redis Labs for hands-on understanding.
- Prepare for interviews by memorizing key differences and use-cases for each database type.