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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:30:15+00:00 2026-05-25T10:30:15+00:00

Not worded my question very well, but with these tables: USER TABLE ANIMALS u_id

  • 0

Not worded my question very well, but with these tables:

    USER TABLE                       ANIMALS
    u_id   username                   a_id   animal
    --------------------------       ---------------------------
      2    alice                       1    cat
      4    brian                       2    small dog
      7    carla                       3    big dog
                                       4    rabbit
                                       5    guinea pig
                                       etc.  

I want a user to be able to add however many animals they own to their profile.

What new tables/fields and datatypes would be the best way for me to go about this?

Thank you.

  • 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-25T10:30:17+00:00Added an answer on May 25, 2026 at 10:30 am

    If you need to allow multiple types of the same animal per user (Janet can have more than one Rabbit) then do the following. Make UserId and AnimalID your primary key.

    I would just do

     UserAnimals
     ------------
     UserId
     AnimalID
    

    Filled with data your table might look like this:

     UserAnimals
     ------------
     UserId || AnimalId
          4 || 3
          4 || 2
          7 || 4
    

    Brian has a small dog and a big dog. Carla has a rabbit.

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

Sidebar

Related Questions

I'm not sure that title is worded very well, but not sure how else
Apologies if my question is a little badly worded but I am not quite
Its a very basic question - but i could not find the answer to
I am not sure I worded that correctly but python and time always confuses
I'm not sure if I worded the subject correctly but essentially I'm curious if
I think my question may be worded incorrectly but heres what I want to
My question is a very simple one i'm sure. It's just I'm not quite
Sorry folks but I asked a question earlier and perhaps did not explain myself
Very simple question but all the answer I read over the web doesn't apply.
I have not worked with parameters in ADO.Net very much. I'm writing a custom

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.