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

  • Home
  • SEARCH
  • 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 6727525
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:03:35+00:00 2026-05-26T10:03:35+00:00

I am struggling with the database design for storing customer address’s and relating them

  • 0

I am struggling with the database design for storing customer address’s and relating them to orders in an inventory system. Currently I have the following schema ideas and 3 options:

Customers
CustomerID
CustomerName …..

CustomerAddress
AddressID
CustomerID
AddressType (Billing, Shipping etc)
AddressLine1
AddressLine2
City
State
Country
PostCode

Orders (Option 1)
OrderID
CustomerID
BillingAddressID
ShippingAddressID

Orders (Option 2)
OrderID
CustomerID
BillingAddressLine1
BillingAddressLine2
BillingCity
BillingState
BillingCountry
BillingPostCode
ShippingAddressLine1
ShippingAddressLine2
ShippingCity
ShippingState
ShippingCountry
ShippingPostCode

Orders (Option 3)
OrderID
CustomerID
BillingAddressBlob
ShippingAddressBlob

I need the address for an order to remain static overtime. So if I look back at an order two years ago I can see the correct address items were shipped too and billed too.

  • 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-26T10:03:35+00:00Added an answer on May 26, 2026 at 10:03 am

    Updating the answer since previous answer did not help the user.

    You can have a table OrderAddress Table to save address

    OrderAddress Table with following columns

    • OrderId
    • AddressId

    To link Customer to Address you can have a table CustomerAddress with following columns

    • CustomerId
    • AddressId
    • Street
    • City
    • PIN
    • Phone
    • State
    • Isactive

    Isactive column would be used to differentiate which address is currently active. Also, From this table you can see how many different addresses existed for a customer

    To find the exact address where order was shipped you can check OrderAddress Table

    Hope this soultions meets your need

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

Sidebar

Related Questions

I'm struggling to model a particular relationship with ActiveRecord. I currently have the following
I'm struggling with a (usually simple to deal with) problem. I have a database
I have to design and implement a reservation system for a hotel. I have
I'm struggling with bridging the concepts of good database design with good object orientated
I am struggling to update my MySQL database. This is what I have written:
I have been struggling with a problem that only happens when the database has
something I have been struggling with. I have a tablefield in a database where
Struggling with the following problem. I have an attribute that defines the name of
I have found out that my SQL 2008 R2 database is really struggling with
Already a few hours I am struggling with the storing time into database table.

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.