Class Notes
Title
SQL vs NoSQL
- SQL is relationational, while noSQL is non-relational
- SQL is table-based, while noSQL is document-based using key0value pairs, graph data-base or wide-column stores
- SQL has pre-defined schema, and NoSQL is more dynamic
- SQL is more standardized than noSQL, in the case of complex querying
- SQL however, is not good for hierarchical data storage, noSQL is better for hierachical data style like JSON
- SQL is good for structured relational data, such as customer info for a store, and how the customer is related to orders and staffs and stores
- NoSQL is good for hiearchical data (non-relational), such as HTTP queries.
- SQL scales vertically (increased customer base or order), and NoSQL scales horizontally (increased field of queries)
Video
- SQL stands for Structured Query Language
- A relational database is structured in tables, which has stricter standards
- A schema is what defines what can go into the table (fields), items cannot have more fields than other items
- A NoSQL database is non-relational database, it works by implementing key-value pairs
- A MongoDB database is for NoSQL data-bases.
- MongoDB is more flexible, due to the lack of pre-defined strucuture and the data do not need to have the same fields (no schema)
- The disadvantage is the uncertainty of what key includes what value
Back to main page
References