/django_orm

Supplementary material for Naukri learning's video on ORMs in Django

Primary LanguagePython

Django ORM

Content

  1. What is ORM
  2. Why is it needed
  3. Advantages and Disadvantages
  4. How to connect with DB using ORM in Django
  5. Creating tables and models
  6. How to query tables using ORM
  7. Summary and Resources
  8. Conclusion

What is ORM

Object-Relational Mapping (ORM) is a technique that lets you query and manipulate data from a database using an object-oriented paradigm

Why is it needed

Handles the complex logic of sql to interact with DB.
It improves security.

Advanatages

  1. Reduces development time.
  2. Improves security.
  3. Overcomes the vendor specific differences of SQL
  4. Makes migration easier.

Disadvantages

  1. Developer does not get to interact with DB directly.
  2. Are often slow.
  3. Cannot create complex optimised queries which can be done in sql.