CouchDB中的Schemas詳解
1 technical a representation of a plan or theory in the form. of an outline or model: a schema of scientific reasoning.
2 Logic a syllogistic figure.
3 (in Kantian philosophy) a conception of what is common to all members of a class; a general or essential type or form.
CouchDB is a schema-less document store, but there are times when a schema is a good thing to have around, one way or another. So can you have your cake and eat it too?
Below I'll take a high level look at adding a kind of schema to an application and the benefits and draw backs associated with this way of working. What I describe below isn't for everyone. It goes against some of the core principles of CouchDB and makes your data much less human readable, but there are cases where that trade off is worth making.
2 Logic a syllogistic figure.
3 (in Kantian philosophy) a conception of what is common to all members of a class; a general or essential type or form.
CouchDB is a schema-less document store, but there are times when a schema is a good thing to have around, one way or another. So can you have your cake and eat it too?
Below I'll take a high level look at adding a kind of schema to an application and the benefits and draw backs associated with this way of working. What I describe below isn't for everyone. It goes against some of the core principles of CouchDB and makes your data much less human readable, but there are cases where that trade off is worth making.
[b]Schemas: WTF?![/b]
It might seem a bit weird to add a schema to a schema-less database but sometimes it is a very useful thing indeed. When you're dealing with large datasets verbose object key names can be a problem (e.g. cost you money) so you end up stuck between a rock and a hard place; either make your data terse and hard to use or be explicit and spend more on storage and network.
1.{
2."shape": "triangle",
3."colour_label": "red",
4."opposite_length_in_mm": 767.12254256805875,
5."angle_in_radians": 1.5514293603308698,
6."adjacent_length_in_mm": 73.59881843627835
7.}
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/301743/viewspace-742994/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 使用 Couchdb-python 操作 CouchDBPython
- 不做 NoSQL 的 CouchDB(轉)SQL
- Mongoose Schemas定義中timestamps選項的妙用Go
- ORACLE 修改schemas的方法一Oracle
- Create schemas for new prod
- CouchDB 入門指南
- JavaScript中的this詳解JavaScript
- 詳解JavaScript中的thisJavaScript
- Oracle下的Databse,Instance,SchemasOracle
- 在HyperLedger Fabric中啟用CouchDB作為State DatabaseDatabase
- NoSQL(MongoDB,Riak,CouchDB,Redis)SQLMongoDBRedis
- Erlang中的Record詳解
- Hive中的UDF詳解Hive
- 詳解Vue中的插槽Vue
- 詳解 MySQL 中的 explainMySqlAI
- Oracle中的SCN詳解Oracle
- Oracle 11g Default SchemasOracle
- 詳解 Spark 中的 BucketingSpark
- 詳解 Java 中的物件克隆Java物件
- JS中Object的API詳解JSObjectAPI
- MySQL 中的事務詳解MySql
- TypeScript中的函式詳解TypeScript函式
- Java中的ThreadLocal詳解Javathread
- 詳解object detection中的mAPObject
- Python中的Super詳解Python
- 詳解Python中的程式Python
- vue cli中的env詳解Vue
- Oracle中job的使用詳解Oracle
- SAP 中的批次管理詳解
- Python中的列表詳解Python
- javascript中的Event Loop詳解JavaScriptOOP
- JavaScript 中的遍歷詳解JavaScript
- Eclipse中的buildpath詳解EclipseUI
- php中declare的作用詳解PHP
- Netty中的ChannelHander詳解Netty
- Java中的弱引用詳解Java
- 深入詳解SQL中的NullSQLNull
- 詳解Javascript 中的this指標JavaScript指標