Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor internal database model for 7.0 #204

Open
npetzall opened this issue Dec 19, 2017 · 1 comment
Open

Refactor internal database model for 7.0 #204

npetzall opened this issue Dec 19, 2017 · 1 comment
Labels
Milestone

Comments

@npetzall
Copy link
Member

I propose that for version 7.0 we refactor the model to

Database/DatabaseInstance (global properties/information not bound to catalog or schema)
-> Catalog (if none is reported by jdbc a default is created)
--> Schema (Sometimes what called user or in mysql case database)
---> Views
---> Routines
---> Tables
----> Columns etc

So the important part for people to supply would be -dbi (sid, server, service etc) if needed and schema or schemas.

A possible cmd for mysql would be -t mysql -dp pathToDriver -s myDb -h host -u user -p password -o output (if we opted for #184 and just load everything in a lib directory -dp could be removed)

Since DetabaseMetaData.getTable() all support wildcards and contain Catalog and Schema in ResultSet.

Which would mean that the -cat option would only be used to narrow the search

catalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those without a catalog; null means that the catalog name should not be used to narrow the search

We would use one single model regardless of single schema or multiple schemas.

Currently we could use supplied catalog, schema as search criteria and create them when results have been found. This would avoid some required input, and one could supply them when needing to narrow the search.

But i feel the model would more reflect the relationship between the different objects than the current.

Lets discuss.

@rafalkasa rafalkasa added this to the 7.0.0 milestone Dec 19, 2017
@npetzall
Copy link
Member Author

The new model shall not contain Config of any sort or Databasemetadata or schemameta.

@danwatt I saw your comment in the clean up. So I thought I add it as sort of a requirement. That I want the model to be more towards value object only reason is that I want it to be easily serializable and also that it can have a nice interface for the data if it's going to become a separate model.

It's let's discuss in the description so if any one has ideas please share.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants