A database is an organized collection of data that is stored electronically and can be accessed, managed, and updated efficiently.
It allows users to store information systematically, making it easier to retrieve, manipulate, and analyze data when needed
Feature | RDBMS (Relational Database Management System) | NoSQL (Not Only SQL) |
---|---|---|
Data Structure | Table-based (rows and columns) | Document, key-value, graph, or column-based |
Schema | Fixed schema (tables with predefined columns) | Flexible schema (schema-less or dynamic) |
Query Language | SQL (Structured Query Language) | Varies (e.g., MongoDB uses BSON, Cassandra uses CQL) |
Scalability | Vertical scaling (adding more power to a single server) | Horizontal scaling (adding more servers) |
ACID Compliance | Fully ACID compliant (Atomicity, Consistency, Isolation, Durability) | May or may not be ACID compliant (Eventual consistency is common) |
Data Integrity | Strong data integrity and consistency | Eventual consistency, often favors performance over consistency |
Transactions | Supports complex transactions with multiple operations | Limited support for transactions (varies by system) |
Performance | Slower with large data volumes, especially in distributed environments | High performance, especially with large datasets and distributed systems |
Use Cases | Suitable for structured data, banking systems, ERP, CRM | Suitable for big data, real-time apps, social networks, IoT |
Examples | MySQL, PostgreSQL, Oracle, SQL Server | MongoDB, Cassandra, Couchbase, Redis, Neo4j |
Features | SQL Language | NoSQL Language |
---|---|---|
Definition | Structured Query Language used for relational databases | Query methods or APIs used for non-relational databases |
Syntax | Standardized and uniform | Varies by database type (key-value, document, graph. etc) |
Query Style | Declarative. uses SELECT, INSERT, UPDATE, DELETE | Depends on database; may use JSON-like syntax, REST APIs, or custom queries |
Data Relationship | Strongly supports JOINs and relationships | Limited or handled differently (e.g., embedding or linking) |
Schema Dependency | Requires predefined schema | Typically schema-less or dynamic |
Complexity | Suitable for complex queries | Simplified queries for unstructured data |
Examples | MySQL ( SELECT * FROM table; ) | MongoDB ( db.collection.find({}) ) |
Made By SOU Student for SOU Students