0

I'm learning some django lecture that used postgresql database.

But I am familiar with MySQL so I want to use mysql.

I heard that Django ORM automatically convert command to query.(So user do not have to know exact database query)

I want to know that, Can I use mysql instead of postgresql in this lecture?

Any problem with this?

1 Answer 1

1

Django's ORM by default supports

  • PostgreSQL
  • MySQL
  • SQLite
  • Oracle

with the right bindings.

You would require psycopg2 in order for the postgres connections to work. Once the setup is complete, the ORM can convert from model based queries to raw sql. You can inspect that using the .query on the queryset. Note that this also implies the ORM can support some of the advanced features of postgresql

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.