Let’s build an automatic Django ORM feature matrix!

Hey everyone!

I’ve been thinking—it would be awesome to have an official, always up-to-date table that shows which Django ORM features are actually supported by each database backend.
Not just a manual page, but something generated automatically from Django’s code, so it’s always correct!

I wrote a blog post with some ideas and an “illustrative only” mockup:
“Django: one ORM to rule all databases :ring:

Would you find a matrix like this useful? What features would you want to see listed?
I’d love to hear your thoughts and feedback—let’s make this happen together!

10 Likes

:100: Automate all the Things!
I think this would be extremely helpful.
It would serve as a blueprint for similar projects like sqlalchemy could follow.

1 Like

This could be very useful also for third-party backend integrations (like mssql or even mongo), so they can document/claim their level of compatibility.

Something which can build for each selected backend the corresponding row in the feature matrix would be very helpful also to spread which kind of features are directly supported by the ORM!

1 Like

If development begins, I’d love to participate in the project. It could be my first experience contributing to Django :slight_smile:
It’s also Hacktoberfest! Some PR might be helpful.

1 Like

I think a matrix like this would be useful, in particular if it was automated from the code as you suggested so it stays up-to-date.

Would it be worth it to make the order of the databases listed in the matrix random? Or do we want to intentionally choose the order they are listed?

1 Like

It would be super useful to be able to quickly visualize the level of support for 3rd party database backends such as the MongoDB backend to be able to quickly identify if the level of support is right for what you’re building.

2 Likes

I still have some kind of idea, almost a dream: it would be great to have Django ORM as a standalone library, because it’s really cool and easy to use.

I’m always sad when realizing that SQLAlchemy is most common python ORM and a lot of python backend developers even don’t consider other options when they use something like FastAPI or Flask.

Are you guys familiar with TortoiseORM Tortoise ORM - Tortoise ORM v0.25.1 Documentation .

It doesn’t explicitly have Django compatibility as a goal, but it’s APi was inspired by Django and feels very close. (although it is native async, so that the biggest difference).

2 Likes

I always consider the proper “choice” based on my real needs. There are different tools capable of offering different advantages and sometimes Django is not the most fitting choice, especially when you “simply” need a lower structured tool like SQL Alchemy, I guess.

1 Like

@pauloxnet thank you, I think this would be a very helpful piece of documentation :slight_smile:

1 Like