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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:05:42+00:00 2026-05-14T06:05:42+00:00

here is my 3 tables: table 1 — stores user information and it has

  • 0

here is my 3 tables:

table 1 — stores user information and it has unique data

table 2 — stores place category such as, toronto, ny, london, etc hence this is is also unique

table 3 — has duplicate information. it stores all the places a user have been.

the 3 tables are linked or joined by these ids:

table 1 has an “table1_id”

table 2 has an “table2_id” and “place_name”

table 3 has an “table3_id”, “table1_id”, “place_name”

i have an interface where an admin sees all users. beside a user is “edit” button. clicking on that edit button allows you to edit a specific user in a form fields which has a multiple drop down box for “places”.

if an admin edits a user and add 1 “places” for the user, i insert that information using php. if the admin decides to deselect that 1 “places” do i delete it or mark it as on and off? how about if the admin decides to select 2 “places” for the user; change the first “places” and add an additional “places”. will my table just keep growing and will i have just redundant information?

thanks.

  • 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-14T06:05:43+00:00Added an answer on May 14, 2026 at 6:05 am

    Tables 1 and 2 sound correct. Table 3 should not contain place_name. Instead, you should have foreign key references to both table1_id and table2_id (you can optionally keep table3_id). This makes table3 a junction table.

    When you want to delete a place for a user, you’ll delete a row in table_3 (and that’s it). When adding a place, you first check if it exists in table 1. If not, you add it to table 1. Then, you add a row to table 3. A change (e.g. renaming a place in the UI for a user) should be broken down into a delete then add.

    This will avoid redundant information.

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

Sidebar

Related Questions

Here is the script to create my tables: CREATE TABLE clients ( client_i INT(11),
Here's my table: CREATE TABLE `alums_alumphoto` ( `id` int(11) NOT NULL auto_increment, `alum_id` int(11)
Replaces Question: Update multiple rows into SQL table Here's a Code Snippet to update
Here is a simple scenario with table characters: CharacterName GameTime Gold Live Foo 10
Here is a simplification of my database: Table: Property Fields: ID, Address Table: Quote
While designing a table my colleague here says that I should avoid identity column
Here's my scenario: I've got a table of (let's call them) nodes. Primary key
Here's my case: I have a table view showing contacts. Add button in the
Well here's my problem I have three tables; regions, countries, states. Countries can be
I have a table with a structure like the following: LocationID AccountNumber long-guid-here 12345

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.