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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T09:59:49+00:00 2026-06-11T09:59:49+00:00

I have created a web form with the following values first name last name

  • 0

I have created a web form with the following values

  • first name
  • last name
  • address line 1
  • address line 2
  • city
  • state
  • contact1
  • contact2
  • email id
  • password
  • confirm password…

Upon clicking the submit button, a stored procedure savedata is invoked.

The fields name, address and contacts are saved into table personal_details, while email and password are stored into login_detail.

The table personal_details has columns user_id int identity(1,1) pk…
Same user_id int identity(1,1) fk is defined in login_detail table…

Now, is it possible that 2 users 1 and 2 submit the form at the same time and user1’s personal details get pushed in table and then user2’s personal details get pushed.

Generating id as 1 and 2 respectively…

but for login details user2 data get pushed first then user1…generating ids 1 and 2… which are wrong….

Is there any other method to get the same ids for both the tables?

thanks

And this is my first question…sorry if I am not able to frame it properly…

  • 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-11T09:59:51+00:00Added an answer on June 11, 2026 at 9:59 am

    You should perform the following sequence of steps in a single transaction to ensure the atomicity of this save operation:

    1. BEGIN TRANSACTION
    2. Insert record into the personal_details table.
    3. Obtain the user_id corresponding to this new record added.
    4. Insert record into the login_details table with the user_id as the one obtained in the previous step.
    5. COMMIT TRANSACTION.

    Also, it doesn’t seem appropriate to “vertically partition” the details of a user across two tables when there is a one-to-one correspondence between records in these two tables. You could just have a single table unless there are attributes of a user that carry multiple values for a single user id i.e. one-to-many relationship.

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

Sidebar

Related Questions

I have created a simple web app/form using google app engine. the site is
I have created a great stand-alone web form in asp.net utilizing many jQuery features
I have two applications Web Socket and Web Service created in .Net/Web Form and
I have created a web form in c# that accepts username and password and
I have created a form (enquiry form) in HTML that posts to the following
I have a web form that uses if statements to create a string of
I have created web pages where am using pixel to position various html elements.
I have created Web-Service in asp.net with c# . Now i want to pass
I have created my web socket server and client using this simple tutorial here
I have created a web browser in c# this was what i get when

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.