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

Cosmos provider has many more limitations than those documented #4017

Closed
dougclutter opened this issue Sep 7, 2022 · 2 comments · Fixed by #4255
Closed

Cosmos provider has many more limitations than those documented #4017

dougclutter opened this issue Sep 7, 2022 · 2 comments · Fixed by #4255
Milestone

Comments

@dougclutter
Copy link

Here are a few Cosmos Provider limitations that should be mentioned on this page:

  • EF Core Migrations are not supported by the Cosmos Provider. Since this wasn't specifically mentioned on this page, I tried to use Migrations, and it ended...poorly. The error message returned by the Cosmos Provider when trying to initialize migrations is less than useless. Please save other developers the time and frustration by specifically mentioning this limitation on this page.
  • Indexes defined on the DbContext are not created by EnsureDatabaseExists. The containers are created, but the indexes are not.
  • Check constraints, et al - I haven't specifically tried these yet, but I'm betting they don't work either. If not, please let us know on this page.

I've spent most of my career working with Oracle/SQL Server databases, so my feedback is tainted by my RDBMS background. Nonetheless, I hope this was helpful.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@roji
Copy link
Member

roji commented Sep 7, 2022

@dougclutter at the end of the day, Cosmos isn't a relational database, and there are many relational features which EF supports which aren't relevant there; in general, it's not a good idea to approach a non-relational document database such as Cosmos, and to treat it the same way as one would a relational database.

I'm not sure it makes sense to enumerate each and every relational feature that doesn't work on Cosmos, though I agree that the limitations page could be improved.

@dougclutter
Copy link
Author

@roji - While I agree that document databases are very different animals and should be approached differently, I think it is reasonable to expect that many users reading the Limitations page are new to document databases and need additional guidance. There are also a number of reasons why a new user may assume that a Cosmos database can be treated like an RDBMS:

  1. Microsoft has named their primary interface to Cosmos SQL API. Which is IMHO a misguided and misleading label. :)
  2. Microsoft provides an EF Core Provider for Cosmos. Given that EF/Core is firmly rooted in the world of RDBMS, a developer familiar with EF/Core might naturally assume Cosmos is SQL-like.

The Provider documentation does mention that a familiarity with document databases and Cosmos especially should be considered a prerequisite to using the Provider. Still, I think the Limitations page should go out of its way to enumerate what is not supported. Perhaps it would help to have a grid of all providers produced by Microsoft (SQL Server, In Memory, SQL Lite, Cosmos, et al) with a list of high-level features (CRUD, Joins, Includes, DB Procs/Funcs, et al). The more information a Developer has, the lower their frustration.

@ajcvickers ajcvickers added this to the Backlog milestone Sep 13, 2022
@ajcvickers ajcvickers self-assigned this Feb 14, 2023
@ajcvickers ajcvickers modified the milestones: Backlog, 8.0.0 Feb 14, 2023
ajcvickers added a commit that referenced this issue Feb 14, 2023
Fixes #4017
Fixes #3730
Fixes #3555

Part of #2325
ajcvickers added a commit that referenced this issue Feb 14, 2023
Fixes #4017
Fixes #3730
Fixes #3555

Part of #2325
ajcvickers added a commit that referenced this issue Feb 18, 2023
Fixes #4017
Fixes #3730
Fixes #3555

Part of #2325
@ajcvickers ajcvickers removed their assignment Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants