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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:26:00+00:00 2026-05-23T07:26:00+00:00

I have a need to assign the next sequence number for a Project according

  • 0

I have a need to assign the next sequence number for a Project according to a given prefix code. So you wind up with alternate id numbers like PROJ_ABC_001, PROJ_ABC_002, PROJ_XYZ_001, PROJ_XYZ_002, etc.

While this need is quite specific, I would suggest that there is a more general and common case where businesses use alternate ids that are sequential integers in order to identify different Customers, Projects, Orders – whatever.

Of course these aren’t primary keys in the database. And while databases are a logical place to maintain and generate a sequence number, only the application knows the specific rules of a given use case.

Have you ever treated a sequence number as a domain object in an application? Can you suggest any design pattern(s) to do so in a multi-user environment?

Cheers,
Berryl

  • 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-23T07:26:01+00:00Added an answer on May 23, 2026 at 7:26 am

    The closest answer I found here was along the lines of the accepted answer for a related post.

    That posting is much more NHibernate specific than I’d like, so this is a half-hearted answer. Love to see a more technology agnostic (ie, design pattern) type of answer.

    Cheers,
    Berryl

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

Sidebar

Related Questions

We have need for a rating system in a project we are working on,
I have need to select a number of 'master' rows from a table, also
I have code, where i add ImageButton to table programaticly and I need to
I have a bit of code like this: FileReader fr = new FileReader(file); BufferedReader
I have a situation where I need to assign an appropriate rate to an
I have a directory, let's call it /tmp/foo/bar_v101/scripts that I need to assign to
I have need to produce LINE, BAR, and PIE charts in Rails. I have
I have need to return multiple results from a subquery and have been unable
I have need to pack four signed bytes into 32-bit integral type. this is
I have need for a function pointer that takes two arguments and returns a

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.