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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:44:39+00:00 2026-05-13T18:44:39+00:00

The title might be a little misleading because I didn’t really know what to

  • 0

The title might be a little misleading because I didn’t really know what to call it. Here is my dbml and I am using the repository pattern to communicate between my application layer and my SQL layer. As you can see, I have four tables. Three of them have a foreign key to ContactId. I used this method because I need to store an “array”, so I made several tables. So now I am wondering how to make it so that I can “add” an email address, phone number, or address to a contact and manipulate it through the contact.

  • 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-13T18:44:40+00:00Added an answer on May 13, 2026 at 6:44 pm

    The “obvious” answer is to have a Contact class which has addEmail, addPhone, and addAddress methods, plus the matching stored procedures in the database. Is there more to your question than this?

    Also, while this is not directly part of your question, you may want to think about normalizing your design. The typical way to handle these types of things is with one-to-many tables. For example, your email address table would look like this:

    EmailId (int - PK)
    ContactId  (int - FK to Contact)
    EmailAddress (varchar)
    

    OR maybe:

    ContactId  (int - FK)
    EmailNumber (tinyint? sequential 1, 2, 3, ...)
    EmailAddress (varchar)
    

    with the PK being ContactId and EmailNumber

    Either way, each row stores a single email address. This should make it easier to add or remove individual emails, and removes the limit of three emails in your current design. It also makes it easier to add additional info about each email address. For example, is it a home or work address. Or, is the email address valid.

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

Sidebar

Related Questions

Title might be confusing, didn't quite know how to put it. Here's what i
I know the title of this question might be a little bit misleading; I
I didn't really know how to phrase the title of my questions, so my
Hi i know the Title might sound a little confusing but im reading in
I suppose the title might be a little misleading, but I couldn't think of
Ok this might sound a little vague from the title, but that's because I
The title of this question might be a little misleading, but it was the
The title might be a little misleading, and I apologize for that. What I
This might spund a little bit funny, didn't even know how to put the
I'm don't know the terms for this problem, the title might be a little

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.