Q: Django ORM에서 queryset과 object의 차이점에 대해서 설명하시오
A:
object는 하나의 객체, queryset은 object들의 list
Django QuerySet
A QuerySet is a collection of data from a database.
A QuerySet is built up as a list of objects.
QuerySets makes it easier to get the data you actually need, by allowing you to filter and order the data at an early stage.
https://www.w3schools.com/django/django_queryset.php
Django QuerySet
W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.
www.w3schools.com
QuerySets represent a collection of objects from the database and can be constructed, filtered, sliced, or generally passed around without actually hitting the database.
https://blog.logrocket.com/querysets-and-aggregations-in-django/
QuerySets and aggregations in Django - LogRocket Blog
Learn how to efficiently utilize filters and queries in Django from basic to advanced with this guide to QuerySets and aggregations.
blog.logrocket.com
Q: Django ORM에서 정참조와 역참조에 대해서 설명하시오
A:
https://junghogit.github.io/django/django-orm-relation/
django 정참조와 역참조
관계된 데이터에 접근하는 법
junghogit.github.io
https://docs.djangoproject.com/en/4.2/topics/db/queries/#related-objects
Django
The web framework for perfectionists with deadlines.
docs.djangoproject.com
'TIL' 카테고리의 다른 글
| TIL 072823 (0) | 2023.07.28 |
|---|---|
| TIL 072723 (0) | 2023.07.27 |
| TIL 072523 (0) | 2023.07.25 |
| TIL 072423 (0) | 2023.07.24 |
| TIL 072123 (0) | 2023.07.24 |