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,

  1. Expose denormalised data via APIs (REST and GraphQL).
  2. 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:

  1. Support for Materialized views

Change History (1)

comment:1 by Tim Graham, 3 years ago

Resolution: needsinfo
Status: newclosed

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.

Note: See TracTickets for help on using tickets.
Back to Top