Opened 3 years ago
Closed 3 years ago
#33535 closed New feature (needsinfo)
Add Basic support for DB View
Reported by: | Vasanth | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | ORM, DB View |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Since Django ORM lends itself to easy data manipulation and query generation, we can define Managers similar to DB Views. However, it is simpler to offload complicated Queries critical to the app to the DB.
It allows developers to,
- Expose denormalised data via APIs (REST and GraphQL).
- Reuse the virtual tables with third-party applications.
All of Django's officially DBs support DB Views. So basic CR*D support can be added for DB Views. In addition, abstract functions can be used for modifying data through views which allows to side-step sqlite not supporting it.
Non-goals:
- Support for Materialized views
Note:
See TracTickets
for help on using tickets.
The django-developers discussion hasn't received much feedback. You'll need to flesh out your proposal and get a consensus there before we can accept a ticket.