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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- SAP HANA Schemas 和 HDI ContainersAI
- Django REST framework API 指南(21):SchemasDjangoRESTFrameworkAPI
- JavaScript中的this詳解JavaScript
- Netty中的ChannelHander詳解Netty
- Netty中的ByteBuf詳解Netty
- 詳解 Spark 中的 BucketingSpark
- Java中的ThreadLocal詳解Javathread
- vue中的插槽詳解Vue
- Python中的列表詳解Python
- 詳解Python中的程式Python
- Erlang中的Record詳解
- Python中的Super詳解Python
- 詳解Vue中的插槽Vue
- Hive中的UDF詳解Hive
- Ubuntu 20.4 上安裝配置 CouchDBUbuntu
- Oracle Database 19c安裝Sample SchemasOracleDatabase
- JS中Object的API詳解JSObjectAPI
- Oracle中job的使用詳解Oracle
- 詳解 Java 中的物件克隆Java物件
- iOS中的Reference Counting詳解iOS
- TypeScript中的函式詳解TypeScript函式
- MySQL 中的事務詳解MySql
- 詳解object detection中的mAPObject
- JavaWeb中的Tomcat,Servlet詳解JavaWebTomcatServlet
- Java中的方法引用詳解Java
- vue cli中的env詳解Vue
- JavaScript中的async/await詳解JavaScriptAI
- gradle中的build script詳解GradleUI
- SAP 中的批次管理詳解
- js中的|與 && 運算子詳解JS
- css中的px、em、rem 詳解CSSREM
- iOS 中的 GCD 實現詳解iOSGC
- jQuery中的Deferred詳解和使用jQuery
- Linux中tail命令的使用詳解!LinuxAI
- Linux中VIM的工作模式詳解!Linux模式
- Java中的static詳細講解Java
- Maven依賴中的scope詳解Maven
- Java中的Type型別詳解Java型別
- Java中的設計模式詳解Java設計模式