k1LoW / tbls

tbls is a CI-Friendly tool for document a database, written in Go.
MIT License
3.37k stars 165 forks source link

Add support for Redis #442

Open gunta opened 1 year ago

gunta commented 1 year ago

It would be nice to have support for Redis.

k1LoW commented 1 year ago

I think Redis is a KVS. I can't imagine documentation like RDMBS. If you don't mind, could you describe using markdown what you want tbls to generate?

gunta commented 1 year ago

I was imagining using a process of automatic inference of schemas and data type based on introspecting the actual data. This concept can be applied not only for Redis, but for other databases such as DynamoDB.

For the markdown I would expect inferred content similar to the current RDMBS support, but with just inferred Column and Data types. I wouldn't expect a graph, just the text.

These papers show some hints on how it would work:

k1LoW commented 1 year ago

It is a very attractive approach.

However, as long as it is inferential, is it not a 100% correct schema? I am currently skeptical about documenting uncertain information since it is a document that engineers refer to for development purposes.

gunta commented 1 year ago

It's not exactly a "schema", but it would be more like a "reference" saying "hey, the current production/development data looks like this".

I can see this would help when new developers join a project in order to "see" how the data was structured before. This would help understand, and make easy to plan or discuss new additions to the data.

So not much as "docs" but more as "reference".

k1LoW commented 1 year ago

It's not exactly a "schema", but it would be more like a "reference" saying "hey, the current production/development data looks like this".

It sounds very useful, but I think it is outside the scope of tbls' responsibilities.