Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6593607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:42:12+00:00 2026-05-25T17:42:12+00:00

I am trying to design a database structure for a website that offers people

  • 0

I am trying to design a database structure for a website that offers people to open a personal profile.
I am trying to figure out if the design that I’ve chosen is good enough.. The reason i suspect it might be problematic is that I use many relations between many tables. That way, when a person’s page is being loaded, there are many JOINs behind the scenes and that will surely create a bottleneck. I would appreciate if you can help me figuring out if the design is proper or if I should reconsider it.

So I have come up with the following design:

class Person(models.Model):

    GENDER_CHOICES = (
                    ('M', 'Male'),
                    ('F', 'Female'),
    )

    name = models.CharField(max_length=200)
    # Each person can have one profession
    profession = models.ForeignKey(Profession)
    email = models.CharField(max_length=100, blank=True)
    website = models.CharField(max_length=200, blank=True)
    gender = models.CharField(max_length=1, choices=GENDER_CHOICES))
    birth_date = models.DateField(blank=True, null=True)    

class Profession(models.Model):    
    type = models.CharField(max_length=20, blank=False, choices = ("Teacher","Pilot","Politician"))

#Each person can have several geolocations (represent the person's home/office/other address)
class Geolocation(models.Model):    
    latitude = models.FloatField()
    longitude = models.FloatField()
    address = models.TextField()
    related_person = models.ForeignKey(Person, blank=False, null=False)

#Each person can have several medias (you tube movies)
class Media(models.Model):
    youtube_id = models.CharField(max_length=100)
    related_person = models.ForeignKey(Person, blank=False, null=False)

#Each person can have several websites
class Websites(models.Model):
    website_url = models.CharField(max_length=200, blank=False)
    website_name = models.CharField(max_length=200)
    related_person = models.ForeignKey(Person, blank=False, null=False)
    #See below...
    related_link_farm = models.ForeignKey(LinkFarms, blank=True, null=True)

#Each website that refers to a person must be also refered to a link farm
class LinkFarms(models.Model):
    farm_name = models.CharField(max_length=200, blank=False)

Notice that for each page loaded there are at least 5 table joins.

Thanks,

Meir

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T17:42:13+00:00Added an answer on May 25, 2026 at 5:42 pm

    It’s ok to normalise data. That’s what relational databases are for! Your design looks fine to me. If it becomes a problem you can always cache page renders.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to design database structure for personal finance application. Basically I'll have Transactions
I'm trying to build out a mysql database design for a project. The problem
Hey im new to database design and having trouble trying to figure this one
I am trying to come up with a database design that will be suitable
I'm trying to design application that will have UI with database in the backend.
I am trying to come up with a database design that would work with
I'm trying to design a database for a sports meeting. I think I've got
I'm trying to design a database to record game histories for a game I'm
I've been trying to design a database schema for a side project but I
I am trying to so something like Database Design for Tagging , except each

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.