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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:33:29+00:00 2026-05-22T17:33:29+00:00

I have a database design question. In my application, a user has contact information

  • 0

I have a database design question.

In my application, a user has contact information including

  • telephone number
  • email
  • adress line 1
  • postal box
  • Locality (City)

This is currentl located in a “user” table with the other informations like username, first name, …

The thing is that a user has to have the same kind of information (telephone, email, …) but for his company.

It seems redundant to add additional fields to the “user” table. As the data are similar, I could make a “ContactInfo” table with the fields:

  • phone
  • email
  • address
  • postal box
  • …

Is it a good idea and how should I do the relation between the “user” table and this “contactInfo” table ?

EDIT: I forgot to say that the company contact information is not obligatory. A user can have no company at all.

  • 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-22T17:33:30+00:00Added an answer on May 22, 2026 at 5:33 pm

    Separate tables are the right choice.

    CREATE TABLE users (
      id INT UNSIGNED NOT NULL,
      foo VARCHAR(50),
      PRIMARY KEY (id) );
    
    CREATE TABLE user_contact_info (
      id INT UNSIGNED NOT NULL,
      user_id INT UNSIGNED NOT NULL,
      contact_type VARCHAR(40) NOT NULL,
      phone VARCHAR(20),
      email VARCHAR(200),
      address VARCHAR(200),
      postal_box VARCHAR(20),
      PRIMARY KEY (id, user_id) );
    

    If your database supports foreign keys, there should be a foreign key from user_contact_info.user_id to users.id. user_contact_info.contact_type would be set to work or home or whatever other categories you need.

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

Sidebar

Related Questions

I have posted a question about multilanguage database design here, [] What are best
Does someone have any tips/advice on database design for a web application? The kind
What do I have to consider in database design for a new application which
I have database application, I want to allow the user to restore the deleted
I have a PHP MySQL application which has a modular design. There are about
This is a database design question. I want to build an invoice web application,
I have a question in the field of optimization and application design. I am
This is a tough design question for a application I'm working on. I have
I have an application design question for the nhibernate gurus our there. My application
Think Design: I have many applications that share the same user database! Other tables

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.