mongo vs mongoose
| SQL | NoSQL |
|---|---|
| Horizontal scaling is difficult/impossible | Both horizontal and vertical scaling is possible |
| Relations | No or very few relations |
| Limitations for read and write queries per second | Great for performance for mass read and and write requests |
| Data is distributed across multiple tables | Data is merged / nested in a few collections |
| Data used schema | Schema-less |
complex and query intensive data is good for an SQL database
Oracle Database
any kind of data that requires flexibility and/or scale is good for a NoSQL database
Amazon SimpleDB
NoSQL databases are typically the best for databases that use hierarchical data storage. it follows the key-value pair way of storing data, like json data.
SQL databases are typically the best for most databases that need to be scaled. SQL databases are already vertically scalable.
structured query language
SQL stands for structured query language
a relation database is a database that uses tables of data tied together
a schema is fields or columns of data in a table, it is the way data is organized in a dataset
NoSQL databases are databases not using SQL structure
it works by collecting data from documents. these documents do not require schema to be accessed/viewed
this is the same with Mongo databases, the data is stored in documents.
MongoDB is more flexible than SQL because it allows for horizontal scaling, data does not have to be relational, and it allows for storage of different data formats
a disadvantage of a NoSQL database is duplicate data