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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T15:57:46+00:00 2026-05-13T15:57:46+00:00

What I want to do is have a table structure like this: TypeID int

  • 0

What I want to do is have a table structure like this:

TypeID   int       not null (foreign key)
ItemID   int       (computed value +1 for each value with same TypeId) 
Data     string

e.g.

TypeId  ItemId  Data 
1       1       "some data"
1       2       "some data"
2       1       "some data"
3       1       "some data"
3       2       "some data"

If I have computed columns as a key, am I going to have issues with concurrency as opposed to identity columns?

  • 1 1 Answer
  • 3 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-13T15:57:47+00:00Added an answer on May 13, 2026 at 3:57 pm

    The ItemId column seems to be the result of a ROW_NUMBER OVER(PARTITION BY TypeID) (see the docs) — is that how you’re computing it? As such it’s not really suitable as part of a key due to concurrency issues (two transactions inserting rows with the same TypeID, as you mention). But what does that have to do with “how to increment a subset”? What subset of what? And what’s your question? Why not just make something else the key instead (typically an artificial auto-increment column)?

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

Sidebar

Related Questions

I have a table structure like below : categoryID bigint , primary key ,
Hi i have a table structure like this. table **geoinfo** id name desc I
I have a table structure like this: Comments table id review_id user_id created comments
I have a table structure like the following: table a: id int name varchar
I have a table structure that looks like this: Columns: Account Number Service Code
I have a table structure for displaying posts like this: <table> <tr><td>heading of the
I have table structure like this: ID cond 1 5 1 2 1 6
I have table structure like this EnrollNo,Date,Time 1, 8-10-2011 12:00:32 , 13:12 1, 8-10-2011
I have a table structure like this <tr> <td> Text to move </td> </tr>
For the sake of clarity, lets assume I have a table structure 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.