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

Define data model for INFORMATION_SCHEMA and expose it #342

Open
4 of 11 tasks
krlmlr opened this issue May 1, 2020 · 2 comments
Open
4 of 11 tasks

Define data model for INFORMATION_SCHEMA and expose it #342

krlmlr opened this issue May 1, 2020 · 2 comments
Assignees
Labels
epic Major features that require careful planning
Milestone

Comments

@krlmlr
Copy link
Collaborator

krlmlr commented May 1, 2020

The INFORMATION_SCHEMA is a standardized way for databases to provide information on tables, columns and keys. See https://dataedo.com/kb/databases/all/information_schema for details.

To better understand it, we should build a dm for it. This requires compound keys and needs to be done on top of #335, or as part of it.

  • Build data model for INFORMATION_SCHEMA for MariaDB, as found in relational.fit
  • Define a simpler "meta dm" derived from INFORMATION_SCHEMA that captures all necessary information (table definition, pk, fk)
    • easy to derive from existing INFORMATION_SCHEMA implementations
    • capture all necessary information to create the dm object and also to reconstruct tables with SQL data types on the database
    • what about color?
  • Make compatible with Postgres
  • Make compatible with SQL Server
  • Rethink 0dd37dc which affects contents of constraint_column_usage
  • Shoehorn SQLite (Learn keys from SQLite databases #352)
  • Make compatible with MariaDB (dm_learn_from_db and MySQL #366)
  • Support dm_meta() for arbitrary databases: if INFORMATION_SCHEMA not available, fall back to an implementation that only queries table names and has no schemas or catalogs
  • Implement get_src_tbl_names() via dm_meta()
  • Use JSON to reduce the number of queries (requires dbplyr >= 2.2.0)
  • Use S3 dispatch instead of explicit checks
@krlmlr krlmlr self-assigned this May 1, 2020
@krlmlr krlmlr added this to the 0.1.3 milestone May 1, 2020
@krlmlr krlmlr modified the milestones: 0.1.3, 0.1.4 May 24, 2020
@krlmlr krlmlr modified the milestones: 0.1.4, 0.1.5 Jun 4, 2020
@krlmlr krlmlr modified the milestones: 0.1.6, 0.1.7 Jul 29, 2020
@krlmlr krlmlr modified the milestones: 0.1.7, 0.1.8 Sep 22, 2020
@krlmlr krlmlr modified the milestones: 0.1.8, 0.1.9, 0.1.10 Nov 18, 2020
@krlmlr krlmlr modified the milestones: 0.1.10, 0.1.11 Jan 6, 2021
@krlmlr krlmlr modified the milestones: 0.1.11, 0.1.13, 0.2.0 Apr 25, 2021
@krlmlr krlmlr added the question Further information is requested label Apr 28, 2021
@krlmlr
Copy link
Collaborator Author

krlmlr commented Apr 29, 2021

Diagram for INFORMATION_SCHEMA: http://mysql.xonu.de/INFORMATION_SCHEMA_5_1/

Details

INFORMATION_SCHEMA_5_1

@krlmlr krlmlr modified the milestones: 0.2.0, 0.2.1 May 2, 2021
@krlmlr krlmlr modified the milestones: 0.2.1, 0.2.2 May 11, 2021
@krlmlr krlmlr removed the question Further information is requested label May 11, 2021
@krlmlr krlmlr removed this from the 0.2.2 milestone Jun 20, 2021
@krlmlr krlmlr added this to the 0.2.4 milestone Jun 20, 2021
@krlmlr krlmlr modified the milestones: 0.2.4, 0.2.6 Oct 9, 2021
@krlmlr krlmlr modified the milestones: 0.2.6, 0.3.2 Nov 16, 2021
@krlmlr krlmlr modified the milestones: 0.3.2, 0.2.8, 0.2.9 Apr 7, 2022
@krlmlr krlmlr modified the milestones: 0.2.9, 0.3.0 Jun 6, 2022
@krlmlr
Copy link
Collaborator Author

krlmlr commented Jun 17, 2022

The MySQL version is better, because we lose one table: column_constraints. Postponing, keeping private for now.

@krlmlr krlmlr modified the milestones: 0.3.0, 0.3.1 Jun 17, 2022
@krlmlr krlmlr changed the title Define data model for INFORMATION_SCHEMA Define data model for INFORMATION_SCHEMA and expose it Jun 17, 2022
@krlmlr krlmlr added the epic Major features that require careful planning label Jul 6, 2022
@krlmlr krlmlr modified the milestones: 0.3.1, 1.4.0-meta Jul 6, 2022
@krlmlr krlmlr modified the milestones: 1.4.0-meta, learn Aug 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Major features that require careful planning
Development

No branches or pull requests

1 participant