Django project-apps: What's your approach about implementing a real database scheme?
NickName:Ουιλιαμ Αρκευα Ask DateTime:2019-11-24T06:36:06

Django project-apps: What's your approach about implementing a real database scheme?

I've read articles and posts about what a project and an app is for Django, and basically end up using the typical example of Pool and Users, however a real program generally use a complex relational database, therefore its design gravitates around this RDB; and the eternal conflict raises once again about: which ones to consider an application and which one to consider components of that application?

Let's take as an example this RDB (courtesy of Visual Paradigm): enter image description here

I could consider the whole set as an application or to consider every entity as an application, the outlook looks gray. The only thing I'm sure is about this:

$ django-admin startproject movie_rental

So I wish to learn from the expertise of all of you: What approach (not necessarily those mentioned before) would you use to create applications based on this RDB for a Django project?

Thanks in advance.


PS1: MORE DETAILS RELATED ABOUT MY REQUEST

When programming something I follow this steps:

  1. Understand the context what you are going to program about,
  2. Identify the main actors and objects in this context,
  3. If needed, make an UML diagram,
  4. Design a solid-relational-database diagram, (solid=constraints, triggers, procedures, etc.)
  5. Create the relational database,
  6. Start coding... suffer and enjoy

When I learn something new I hope they follow these same steps to understand where they want to go with their actions.

When reading articles and posts (and viewing videos), almost all of them omit the steps 1 to 5 (because they choose simple demo apps), and when programming they take the easy route, and don't show other situations or the many supposed features that Django offers (reusability, pluggability, etc).

When doing this request, I wish to know what criteria is used for experienced programmers in Django to determine what applications to create based on this sample RDB diagram.

With the (2) answers obtained so far, "application" for...

  1. brandonris1 is about features/services
  2. Jeff Hui is about implementing entities of a DB
  3. James Bennett is about every action on a object, he likes doing a lot of apps

Conclusion so far: Django application is a personal creed.

My initial request was about creating applications, but as models are mentioned, I have this another question: is with a legacy relational database (as showed in the picture) possible to create a Django project with multiple apps? this is because in every Django demo project showed, every app created has a model with their own tables, giving the impression that tables do not interact with those of other applications.

I hope my request is more clear. Thanks again for your help.

Copyright Notice:Content Author:「Ουιλιαμ Αρκευα」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/59012913/django-project-apps-whats-your-approach-about-implementing-a-real-database-sch

More about “Django project-apps: What's your approach about implementing a real database scheme?” related questions

Django: reusable app testing

By following official Django doc, I've extracted an app from my project and made it reusable and installable using pip (currently I still have to learn how to release it on pypi but that's another ...

Show Detail

Django project-apps: What's your approach about implementing a real database scheme?

I've read articles and posts about what a project and an app is for Django, and basically end up using the typical example of Pool and Users, however a real program generally use a complex relational

Show Detail

What is {% url %} in django?

I have Django template: <form id="contactForm" method="get" action="{% url 'contact-form' %}"> ... </form> What is {% url 'contact-form' %} ?

Show Detail

What are Django swappable models?

What are swappable models in Django? And Why sometimes when we do a migration a swappable dependency appears in Django migration files? I have searched for this concept in Django but I did not unde...

Show Detail

What is the need for forms in Django?

I am a noob in Python/Django and want to know what additional benefits Django forms offer compared to html forms? From what I have seen in a few tutorials, Django forms are mostly used for front-end

Show Detail

Django FormPreview - What is it for?

While looking across the Django documentation, I came across the FormPreview. The description says this: Django comes with an optional “form preview” application that helps automate the follow...

Show Detail

What is the diffrence between django apps and django contenttype?

What is the diffrence between django apps and django contenttype in getting models for example from django.apps import apps model = apps.get_model(app_label=app_label,model_name=model_name) and from

Show Detail

Django What is reverse relationship?

Can someone tell me what is reverse relationship means? I have started using Django and in lot of places in the documentation I see 'reverse relationship, being mentioned. What is it exactly mean? ...

Show Detail

What is the Django setup for session?

I want to save sessions in server side instead of db. right now my project using db to store sessions, as per documentation i removed 'django.contrib.sessions' from installed app but its giving error

Show Detail

What is the difference between Django syntax

hello guys what the difference between this two syntax 'blog' and 'blog.apps.BlogConfig' in project this is located in installed app. I think both are same but there should be difference between...

Show Detail