Databases and Data Modeling - mwilkin-401-advanced-javascript/bend-javascript-401d2 GitHub Wiki
Databases are a common type of a persistence layer. There are many different databases which typically have been created around solving a particular problem in a finite domain. The differences in the various types of databases can be in the way in which the data is stored, is it a relational or distributed(non-relational), is there a define schema that is adhered to or is it more loose and dynamic?
The problem being solved will, in large part, dictate which type of database is used.
Considering some of the differences between SQL and NoSQL:
Fundamentally, the data modeling for SQL is designed around the theme of “What answers do I have?” vs NoSQL: “What questions do I have?”
SQL databases are relational databases that are table-based and have predefined schema. NoSQL databases are non-relational or distributed that are document based, key-value pairs, graph db, or wide-column stores and have dynamic schemas for unstructured data. NoSQL databases are best for hierarchiacal data storage as it stores data similar to JSON data and are preferred for large data sets.
SQL uses structured query language for database interactions where as with NoSQL will vary from database to database and is focused on the collection of documents.
Some examples of SQL are: MySql, Oracle, Sqlite, Postgres and MS-SQL.
Some examples of NoSQL are MongoDB, BigTable, Redis, RavenDb, Cassandra, Hbase, Neo4j and CouchDb.
The topic of databases and data storage is quite dense. It is such a powerful tool that can help solve many problems and enhance the functionality of many web applications.