Skip to content

Strongly-typed database schema API that doesn't rely on DataTable #19324

Closed

Description

@roji

The current API to expose database schema is DbConnection.GetSchema(). This has some disadvantages:

  • Reliance on DataTable
  • A weakly-typed API. Aside from being less usable, this promotes less uniformity across providers as different weakly-typed properties can be populated.

A modern, strongly-typed resultset schema API has already been added - DbDataReader.GetColumnSchema() effectively replaces DbDataReader.GetSchema() which suffers from the same shortcomings as DbConnection.GetSchema().

See #15953 for previous discussion.

Activity

  1. karelz commented on Nov 10, 2016

    @karelz
    Member

    We need formal API proposal. We expect it will be rather complex.

  2. roji commented on Nov 12, 2016

    @roji
    MemberAuthor

    Note the substantial previous discussion in #15953 which should be taken into account. The existing weakly-typed DataTable-based API can definitely serve as a starting point, but this is definitely the opportunity to clearly separate common metadata from SQL Server-centric metadata etc.

  3. karelz commented on Nov 12, 2016

    @karelz
    Member

    @roji do you plan to create the proposal?

  4. roji commented on Nov 12, 2016

    @roji
    MemberAuthor

    Well, @saurabh500 made a good start in #15953, it's worth pursuing that with the community. I'm not going to have the time to lead the discussion, although I'd be happy to review/contribute.

  5. transferred this issue fromdotnet/corefxon Jan 31, 2020
  6. added this to the 5.0 milestone on Jan 31, 2020
  7. added
    untriaged
    on Feb 23, 2020
  8. modified the milestones: 5.0.0, Future on Jun 23, 2020
  9. removed
    untriaged
    on Jun 23, 2020
  10. dotnet-policy-service commented on Dec 23, 2024

    @dotnet-policy-service
    Contributor

    Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.

    This process is part of our issue cleanup automation.

  11. added
    backlog-cleanup-candidate
    on Dec 23, 2024
  12. dotnet-policy-service commented on Jan 6, 2025

    @dotnet-policy-service
    Contributor

    This issue will now be closed since it had been marked no-recent-activity but received no further activity in the past 14 days. It is still possible to reopen or comment on the issue, but please note that the issue will be locked if it remains inactive for another 30 days.

  13. removed this from the Future milestone on Jan 6, 2025
  14. locked and limited conversation to collaborators on Feb 6, 2025
  15. removed
    backlog-cleanup-candidate
    on Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    api-needs-workarea-System.Data

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions