From 3e51f3905048b8fbe4cfe9cc0d0f11b1e35ad1b8 Mon Sep 17 00:00:00 2001 From: Ziyang Hu Date: Tue, 27 Dec 2022 23:00:59 +0800 Subject: [PATCH] update time travel intro --- README-zh.md | 12 ++++++++++++ README.md | 21 ++++++++++++++++++++- 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/README-zh.md b/README-zh.md index 68494527..31c62602 100644 --- a/README-zh.md +++ b/README-zh.md @@ -26,6 +26,7 @@ Cozo是一个通用事务性关系型数据库: * 是一个**可嵌入**数据库; * 使用**Datalog**作为查询语句; * 专注于**图数据、图算法**; +* 可进行**时光穿梭**查询; * 支持**高性能、高并发**。 ### “可嵌入”是什么意思? @@ -50,6 +51,17 @@ Datalog可表达所有的 _关系型查询_。_递归_ 的表达是 Datalog 的 > > 当你对Datalog有进一步了解以后,你就会发现Datalog的 _规则_ 就像编程语言中的函数。规则的特点就是其可组合性:将一个查询分解成多个渐进的规则可使它更加清晰、更易维护,且也不会有效率上的损失。与此相对,复杂的SQL查询语句通常表现为多层嵌套的“select-from-where”的形式,可读性不高。 +### 时光穿梭? + +在数据库中,“时光穿梭”意味着跟踪数据随时间的变化,并允许针对在特定时间的数据快照执行查询以获得数据的历史视图。 + +> 在某种意义上,这使得你的数据库变得 _不可变_,因为没有数据会被真正删除。 +> +> 在Cozo中,不是所有数据都自动支持时间旅行:某个表是否有这个能力需要你来决定。这是因为每一项额外的功能都有其代价,而如果你不使用这个功能,其代价你就不必承担。 +> +> 这里有一个关于时光穿梭的[小故事](https://docs.cozodb.org/en/latest/releases/v0.4.html),可以帮助你了解其一些应用场景。 + + ### “高性能、高并发”,有多高? 我们在一台2020年的Mac Mini上,使用RocksDB持久性存储引擎(Cozo支持许多存储引擎)做了一些性能测试: diff --git a/README.md b/README.md index 98d36591..936c2979 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,8 @@ Cozo is a general-purpose, transactional, relational database that uses **Datalog** for query, is **embeddable** but can also handle huge amounts of data and concurrency, -and focuses on **graph** data and algorithms. And it is **performant**! +and focuses on **graph** data and algorithms. +It supports **time travel** and it is **performant**! ### What does _embeddable_ mean here? @@ -76,6 +77,24 @@ you can build your queries piece by piece. > This is unlike the monolithic approach taken by the SQL `select-from-where` in nested forms, > which can sometimes read like [golfing](https://en.wikipedia.org/wiki/Code_golf). +### Time travel? + +Time travel in the database setting means +tracking changes to data over time +and allowing queries to be logically executed at a point in time +to get a historical view of the data. + +> In a sense, this makes your database _immutable_, +> since nothing is really deleted from the database ever. +> +> In Cozo, instead of having all data automatically support +> time travel, we let you decide if you want the capability +> for each of your relation. Every extra functionality comes +> with its cost, and you don't want to pay the price if you don't use it. +> +> For the reason why you might want time travel for your data, +> we have written a [short story](https://docs.cozodb.org/en/latest/releases/v0.4.html). + ### How performant? On a 2020 Mac Mini with the RocksDB persistent storage engine (Cozo supports many storage engines):