Key-Value Stores (MemcacheDB, Voldemort, DynamoDB, Dynomite, Redis, Riak, Windows Azure)
Document Stores (CouchDB, MongoDB)
Wide Column Stores (Hbase, Hadoop, Cassandra)
Graph Databases (Neo4j)
Key-Value Stores
1. The most common; not necessarily the most popular
2. Has rows, each with something like a big dictionary/associative array. Schema may differ from row to row
3. Common on Cloud platforms. e.g. Amazon SimpleDB, Azure Table Storage
4. MemcacheDB, Voldemort
5. DynamoDB (AWS), Dynomite, Redis and Riak
Key-Value Stores Example:
Documention Stores
1. Have “databases”, which are akin(近似) to tables
2. Have “documents”, akin to rows
- Documents are typically JSON objects
- Each document has properties and values
- Values can be scalars, arrays, links to documents in other databases or sub-documents (i.e. contained JSON objects – Allows for hierarchical storage)
- Can have attachments as well
3. Old versions are retained, so Doc Stores work well for content management
4. Some view doc stores as specialized Key-Value stores
5. Most popular with developers, startups, VCs
6. The biggies are CouchDB and MongoDB
Application Orientation
7. Documents can each be addressed by URIs
8. CouchDB supports full REST interface
9. Very geared (適應) towards JavaScript and JSON
- Documents are JSON objects
- CouchDB/MongoDB use JavaScript as native language
10. In CouchDB, “View functions” also have unique URIs and they return HTML. So you can build entire applications in the database
Document Stores Example:
CouchDB Demo 1:
CouchDB Demo 2:
CouchDB Demo 3:
http://127.0.0.1:5984/theNameOfDatabase/_design/example/_view/dotNet
http://127.0.0.1:5984/theNameOfDatabase/_design/example/_view/dataAccess
Result in JavaScript object
http://127.0.0.1:5984/theNameOfDatabase/_design/example/_show/summary/theIDOfTheDocument
Result in HTML
Wide Column Stores
Wide Column Stores Example
Graph Databases
Graph Databases Example
沒有留言:
張貼留言