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 7003339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:03:21+00:00 2026-05-27T21:03:21+00:00

When making a database with users (that have attributes such as religion), what is

  • 0

When making a database with users (that have attributes such as religion), what is the best way to store those attributes and the possible values for them?

Here are the methods and problems:

method 1: If you have a user, say a Christian, you could store this value in the users table under a column called “Religion”. The problem with this method is that there would be many, many occurences of the word “Christian” in the users table, which seems redundant to me.

problem 1: Also, with this method, there is nowhere in the database that all possible values are stored like “Buddhist”, “Muslim”, etc. This would make populating a dropdown difficult if not impossible.

method 2: Another method I came up with is to index these values. Change the “Religion” column in the users table to “ReligionID” and number them. Christian = 1, Muslim = 2, etc. Then have a foreign key relationship to another table with the lookup values.

problem 2: The problem with this method is that there will have to be many, many tables linked to the users table with foreign key values for other similar attributes, like eye color. Although populating a dropdown list would be easy with this method, this seems to create too many joins and seems like an ugly way to design this database.

What is the best way to do this? Feel free to come up with your own methods if these ones are not optimal. Thanks!

  • 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-27T21:03:22+00:00Added an answer on May 27, 2026 at 9:03 pm

    database normalization is all about tradeoffs. The way I look at it, I always start with as close to 3nf as possible (ie. method 2). When either the size of my data, or my performance requirements change … I consider denormalizing (ie. method 1).

    when you get to that point, your applications need to take responsibility for data integrity … depending on how much control you have over the clients of the database, that may or may not be easy. But that’s why you get paid the big bucks 😉

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

Sidebar

Related Questions

I have a database of users that are identified by their device udid (which
I have a database and I want to allow users that I give permission,
I have been making a database and learning along the way. I recently got
I am making a synonyms list that I will store it in database and
I'm making an update to our database and would like to update rows that
I'm making a Java application with an application-logic-thread and a database-access-thread. Both of them
I'm accessing a database in steps, and making sure that I dispose of all
I'm making a database of an imaginary Airport that has a simplified physical model
I have a website with a database of users. On the site, I ask
What's the best practice for making sure that certain ajax calls to certain pages

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.