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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:03:59+00:00 2026-06-05T20:03:59+00:00

I made three tables. Table1=users .And the column names are userid (auto_increment) and username

  • 0

I made three tables.
Table1=users.And the column names are userid (auto_increment) and username.
Table2=hobbies. column names are hobbyid (auto_increment) and hobbyname.
Table3=users_hobbies. column names are FK_userid and FK_hobbyid.

Now whenever I register new user and his/her hobbies from a html form, I select the
corresponding userid and hoobyid
that is generated from table 1 and table 2
and insert them to table 3 using query

So what is the use of relationship, if I create it between table 1 and 3 and table 2 and 3?
Will the corresponding userid and hobbyid automatically go to table 3 without using query?

  • 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-06-05T20:04:00+00:00Added an answer on June 5, 2026 at 8:04 pm

    No, the userid and hobbyid won’t go automatically anywhere.

    The major point of relationships or rather constraints is to enforce data integrity. That means you shouldn’t be able to add an entry containing id 2, 2 into the users_hobbies table without a user with id 2 and a hobby with id 2.

    In order to keep this integrity you can also specify cascadings. (Depending on the Database system, I hardly work with mysql, so I am not sure about that).

    That means, you can specify that all users_hobbies for user with id 1 are deleted if the user himself is deleted.

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

Sidebar

Related Questions

I had made three tables. Table1=users .And the column names are userid (auto_increment) and
I have a problem with my self-made search page. There is 2 tables: **name
I made a viewPager with three layouts on every page... And i want to
I have a last_action column in my users table that updates a unix timestamp
I have an array like so which has the column names of the table
I have a three tables Results: TestID TestCode Value Tests: TestID TestType SysCodeID SystemCodes
I'm trying to make an address book. And have made my tables like this:
I have made a tree structure using c and used it for storing some
I've made my own tree data structure via classes. Now I'm stuck with really
First of all my tree is made up of nodes that look like this:

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.