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

Transactional ACID-compliant database

The Atomicity, Consistency, Isolation, Durability (ACID) of transactions ensure that your data will not be corrupt. Neo4j prides itself in being an ACID-compliant database. To explain this further, it's probably useful to go back to what ACID really means, apart from that your data stays surprise-less. Basically, the acronym is one of the oldest summaries of the four goals that many database management systems strive for, and they are shown in the following figure:

What an ACID base is
  • Atomicity: This means that changes in the database must follow an all
    or nothing rule. Transactions are said to be atomic if when one part of the transaction fails, the consequence is that the entire transaction is rolled back.
  • Consistency: This means that only consistent or valid data will be allowed to be entered into the database. In relational terminology, this often means that the schema of the database has to be applied and maintained at all times. The main consistency requirement in Neo4j is actually that the graph relationships must have a start and an end node. Relationships cannot be dangling. Aside from this, however, the consistency rules in Neo4j will obviously be much looser, as Neo4j implements the concept of an optional schema.
A schema being optional in Neo4j is a really interesting matter; the idea being that it is actually incredibly useful to have a schema-free database when you are still at the beginning of your development cycles. As you are refining your knowledge about the domain and its requirements, your data model will just grow with you--free of any requirements to pre-impose a schema on your iterations. However, as you move closer to production, schema--and therefore consistency--can be really useful. At this point, system administrators and business owners alike will want to have more checks and balances around data quality, and the C in ACID will become more important. Neo4j fully supports both approaches, which is tremendously useful in today's agile development methodologies.
  • Isolation: This requires that multiple transactions that are executed in parallel on the same database instance do not impact each other. The transactions need to take their due course, irrespective of what is happening in the system at the same time. One of the important ways that this is used is in the example where one transaction is writing to the database and another is reading from it. In an isolated database, the read transaction cannot know about the write that is occurring next to it until the transaction of the write operation is complete and fully committed. As long as the write operation is not committed, the read operation will have to work with the old data.
  • Durability: This basically means that committed transactions cannot just disappear and be lost. Persisted storage and transaction commit logs that are forced to be written to disk--even when the actual data structures have not been updated yet--ensure this quality in most database systems, and also in Neo4j.

The summary of all this is probably that Neo4j has really been designed, from the ground up, to be a truly multipurpose database-style solution. It shares many of the qualities of a traditional relational database management system that we know today; it just uses a radically different data model that is well-suited for densely connected use cases.

主站蜘蛛池模板: 泗阳县| 宁陵县| 安庆市| 屯门区| 绥江县| 贞丰县| 泸定县| 花垣县| 公安县| 霍林郭勒市| 南陵县| 屯留县| 万山特区| 淮南市| 阿拉善左旗| 浪卡子县| 梨树县| 龙州县| 视频| 安丘市| 柯坪县| 旌德县| 班玛县| 米泉市| 达拉特旗| 胶州市| 隆昌县| 渭南市| 呼和浩特市| 和静县| 手游| 海淀区| 息烽县| 宣武区| 天柱县| 肇庆市| 上饶市| 荣成市| 乐清市| 孝义市| 临洮县|