Skip to content
  • NoSQL Databases · DBMS

NoSQL Databases

LearnViaNotes @learnvianotes· 2 min read

NoSQL (Not Only SQL) databases are built for horizontal scalability, unstructured schemas, and high write throughput, departing from the rigid ACID constraints of relational systems.

Why NoSQL?

SQL vs NoSQL Comparison

DimensionSQL Databases (RDBMS)NoSQL Databases
SchemaStrict, predefined tabular schema. Changes require DDL migration locks.Dynamic / Schema-less. Records can store custom dynamic columns.
ScalingVertical (Scale Up).Horizontal (Scale Out). Shards data partitions across multiple nodes.
JoinsSupported natively. Executed horizontally.Not supported. Data is denormalized in documents to avoid joins.
TransactionsStrict ACID properties. Absolute consistency.BASE model. Prioritizes availability; eventual consistency.

The 4 Types of NoSQL Databases

Query Comparison: SQL vs MongoDB

ActionSQL DatabaseMongoDB (NoSQL Document)
Insert RowINSERT INTO Users (Name, Age) VALUES ('Alice', 25);db.users.insertOne({ name: "Alice", age: 25 });
Select rowsSELECT * FROM Users WHERE Age > 21;db.users.find({ age: { $gt: 21 } });
Update rowsUPDATE Users SET Age=26 WHERE Name='Alice';db.users.updateMany({ name: "Alice" }, { $set: { age: 26 } });

Free for students and teachers

Write notes like this one

Cards for every idea, quizzes and flashcards, read aloud — on the web and your phone.

Something wrong with this note? Open it to report