Read: Class 05 :Data Modeling With NoSQL Data - Goorob-401-advanced-javascript/amman-javascript-401d1 GitHub Wiki
- SQL : “Normal” or “Traditional” databases like Postgres, SQL Server, Oracle and the like are “Relational”, in that they store data in rows and columns and link related records through a system of keys and pointers (Foreign Keys).
These databases are known for being highly structured. You create tables by identifying the columns, their data types, and rules. You Query the data using a special language (SQL - Structured Query Language) designed to bring all of that data together.
- NoSQL : A “NoSQL” database is based on document storage. For example, rather than have information about a user, their order history, etc in many tables that you have to join together, a Document database puts all of that information into One Record that you can retrieve very quickly, having all of the data you want at your disposal. ORMs (Mongoose) : Using raw JSON is flexible, but problematic. Programmers don’t like surprises. Enter “Mongoose”, and “ORM” for the Mongo database.
ORM - Object Relation Mapping
In other words, rules for Document databases. Mongoose is a Node library that makes it easy for developers to not only interface with a Mongo database, but reliably structure the data (without losing flexibility). Mongoose provides 2 essential things to make this easy for you:
Schema - the rules to structure your data CRUD methods (on steroids) to work easier with the data