官术网_书友最值得收藏!

Discretely writable collections

While it's useful for records to be internally structured into discrete fields, a given property of a record isn't always a single value such as a string or an integer. One simple way to handle fields that contain collections of values is to serialize them using a format such as JSON and then save the serialized collection into a text field. However, in order to update collections stored in this way, the serialized data must be read from the database, decoded, modified, and then written back to the database in its entirety. If two clients try to perform this kind of modification to the same record concurrently, one of the updates will be overwritten by the other. For this reason, many databases offer built-in collection structures that can be discretely updated: values can be added to and removed from collections without reading and rewriting the entire collection. Cassandra is no exception, offering list, set, and map collections, and supporting operations such as append the number 3 to the end of this list. Neither the client nor Cassandra itself needs to read the current state of the collection in order to update it, meaning collection updates are also blazingly efficient.

主站蜘蛛池模板: 华蓥市| 乡宁县| 大埔县| 曲水县| 云霄县| 贵南县| 苍梧县| 隆德县| 溧水县| 荆州市| 榆社县| 江西省| 铜梁县| 龙陵县| 辽宁省| 揭阳市| 晋宁县| 黄骅市| 正定县| 广灵县| 阿瓦提县| 泰来县| 潍坊市| 龙里县| 鹤山市| 济阳县| 禹城市| 定南县| 大悟县| 盐山县| 昭通市| 成武县| 梨树县| 和林格尔县| 曲阜市| 逊克县| 玛沁县| 宿州市| 德令哈市| 宽城| 和田县|