Why should I use document based database instead of relational database?

前端 未结 7 1962
Happy的楠姐
Happy的楠姐 2020-11-29 14:43

Why should I use document based database like CouchDB instead of using relational database. Are there any typical kinds of applications or domains where the document based d

7条回答
  •  遥遥无期
    2020-11-29 15:29

    CouchDB (from their website)

    • A document database server, accessible via a RESTful JSON API. Generally, relational databases aren't simply accessed via REST services, but require a much more complex SQL API. Often these API's (JDBC, ODBC, etc.) are quite complex. REST is quite simple.

    • Ad-hoc and schema-free with a flat address space. Relational databases have complex, fixed schema. You define tables, columns, indexes, sequences, views and other stuff. Couch doesn't require this level of complex, expensive, fragile advanced planning.

    • Distributed, featuring robust, incremental replication with bi-directional conflict detection and management. Some SQL commercial products offer this. Because of the SQL API and the fixed schemas, this is complex, difficult and expensive. For Couch, it appears simple and inexpensive.

    • Query-able and index-able, featuring a table oriented reporting engine that uses Javascript as a query language. So does SQL and relational databases. Nothing new here.

    So. Why CouchDB?

    • REST is simpler than JDBC or ODBC.
    • No Schema is simpler than Schema.
    • Distributed in a way that appears simple and inexpensive.

提交回复
热议问题