timabell / schema-explorer

A database schema explorer, find out more at:
https://timabell.github.io/schema-explorer/
GNU Affero General Public License v3.0
70 stars 6 forks source link

Feature Request - support views, reference and virtual objects (PK, UK, FK, Index, reference) #42

Open aisbergde opened 3 years ago

aisbergde commented 3 years ago

This is a great tool - for tables. I am a mssql based dwh developer and most of my logic is in views or in the combination of views, tables and procedures. And because views have no real PK, UK, FK or index, my database objects have virtual index (can be also PK or UK) and they have virtual FK and also virtual references between entities and between columns. For example a table could be a persistence of a view then I have a virtual reference between this referencing table and the referenced source view. Or I use a parser to extract column references. It is also an open source project, but at the very beginning.

A big challenge is the graphical representation and even more the navigation involving these virtual elements and relations.

I like the idea of schema-explorer very much: the operation is simple and intuitive. Could features be added to schema-explorer?

timabell commented 3 years ago

I'm not doing any further work on this tool now, but it's A-GPL licensed so you are free to make your own improvements as you wish and publish them under the same license.

aisbergde commented 3 years ago

Maybe that would be a reason for me to learn Go :-) Thank you for this intuitive to use tool!

timabell commented 3 years ago

You're welcome, I enjoyed building it.

timabell commented 9 months ago

Looking back at this, I'm not sure what you mean by "virtual" here.

Could you be more specific and define what you mean by

I'm wondering if this is the same as #6 or if you are talking about some other concept like linked servers or mssql virtual tables.

aisbergde commented 9 months ago

the request is related to #6 it is about keys, index and relation, which are not really defined in the database, but they exist only logically. They are used for example to explain and document relations. Or to document the logic in views, because it is not possible to create real PK or relations on views.

Finally, I developed an alternative database documentation generator. Here I explained in detail, what I mean: https://datahandwerk.gitlab.io/dhw/user-guide/documentation-generator.html#_special_requirements_for_technical_database_documentation

timabell commented 9 months ago

interesting. I wonder if extended attributes might be a place to keep this kind of thing that could then be source controlled and shown in a variety of documentation tools

Here's my source-control script for extended-attributes: https://gist.github.com/timabell/69c0bbb6cfcb2b0b93f7d49bb2f06396

And the ms_description one: https://gist.github.com/timabell/6fbd85431925b5724d2f

I see we have overlapping interests, that datahandwerk thing is interesting. Please do drop me a connection on the platform of your choice to chat more (linkedin/twitter/email/telegram etc etc)

I'm imagining a world where there's some standardised extended attributes that layer on the FKs that can't be made real

aisbergde commented 9 months ago

https://datahandwerk.zulipchat.com/

would be a good platform to communicate. Telegram is also possible.

I even did a fork of your project at the beginning, but I am not experienced with Go

timabell commented 2 months ago

DataGrip has a feature a bit like this https://www.jetbrains.com/help/datagrip/virtual-foreign-keys.html