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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T10:56:32+00:00 2026-05-11T10:56:32+00:00

Every Customer has a physical address and an optional mailing address. What is your

  • 0

Every Customer has a physical address and an optional mailing address. What is your preferred way to model this?

Option 1. Customer has foreign key to Address

    Customer   (id, phys_address_id, mail_address_id)    Address    (id, street, city, etc.) 

Option 2. Customer has one-to-many relationship to Address, which contains a field to describe the address type

    Customer   (id)    Address    (id, customer_id, address_type, street, city, etc.) 

Option 3. Address information is de-normalized and stored in Customer

    Customer   (id, phys_street, phys_city, etc. mail_street, mail_city, etc.) 

One of my overriding goals is to simplify the object-relational mappings, so I’m leaning towards the first approach. What are your thoughts?

  • 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. 2026-05-11T10:56:33+00:00Added an answer on May 11, 2026 at 10:56 am

    I tend towards first approach for all the usual reasons of normalisation. This approach also makes it easier to perform data cleansing on mailing details.

    If you are possibly going to allow multiple addresses (mail, residential, etc) or wish to be able to use effective dates, consider this approach

        Customer   (id, phys_address_id)    Cust_address_type (cust_id, mail_address_id, address_type, start_date, end_date)    Address    (id, street, city, etc.) 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Example: I have an in-memory list of customers. Every customer has a list of
On the form, a customer can create multiple groups. Every group has the same
Several random customers get this exception every time I update my Android app. I've
A customer has requested some security enhancements to our Java web application, including the
I'm attempting to design a small database for a customer. My customer has an
I solve bugs for a product. The customer has sent a bundle of log
tldr> Once a customer has been selected, how can all other controllers execute their
I've built a ASP.NET webforms site for a customer, and lately the customer has
I've got a customer that has two websites, the only difference being the subdomain.
Say i'm dealing with 10 library cards, each card has customer values (eg. member

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.