- Array of key-value pairs. The "key" is an attribute name.
- Redis, Vodemort, Dynamo.
- Data is stored in documents.
- Documents are grouped in collections.
- Each document can have an entirely different structure.
- CouchDB, MongoDB.
- Column families - containers for rows.
- No need to know all the columns up front.
- Each row can have different number of columns.
- Cassandra, HBase.
- Data is stored in graph structures
- Nodes: entities
- Properties: information about the entities
- Lines: connections between the entities
- Neo4J, InfiniteGraph
- SQL: store data in tables.
- NoSQL: have different data storage models.
- SQL
- Each record conforms to a fixed schema.
- Schema can be altered, but it requires modifying the whole database.
- NoSQL:
- Schemas are dynamic.
- SQL
- Use SQL (structured query language) for defining and manipulating the data.
- NoSQL
- Queries are focused on a collection of documents.
- UnQL (unstructured query language).
- Different databases have different syntax.
- SQL
- Vertically scalable (by increasing the horsepower: memory, CPU, etc) and expensive.
- Horizontally scalable (across multiple servers); but it can be challenging and time-consuming.
- NoSQL
- Horizontally scalable (by adding more servers) and cheap.
- Atomicity, consistency, isolation, durability
- SQL
- ACID compliant
- Data reliability
- Guarantee of transactions
- NoSQL
- Most sacrifice ACID compliance for performance and scalability.
- Ensure ACID compliance.
- Reduce anomalies.
- Protect database integrity.
- Data is structured and unchanging.
- Data has little or no structure.
- Make the most of cloud computing and storage.
- Cloud-based storage requires data to be easily spread across multiple servers to scale up.
- Rapid development.
- Frequent updates to the data structure.