Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a table of real estate objects. The objects are shown in three lists (sell, rent long, rent short), each object in exactly one list (defined by an ENUM field).

I want to add field seq INT to the table to be able to reorder objects in every of the three lists (ORDER BY seq). Should I permit objects of different lists have the same seq?

share|improve this question
Would you ever be selecting more than one object type at the same time? – Hogan Jul 26 '12 at 17:32
@Hogan: Never (except of the routine which re-generates all output). – porton Jul 26 '12 at 17:35
up vote 2 down vote accepted

If you will never be selecting more than one object type at the same time you can have duplicates over types.

Whenever I've done it this way I've always regretted it. It does not cost much to make then unique and it can solve lots of issues. (For example a rent long changes to a rent short).

If it is not "to hard" I highly recommend not sharing values in this case.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.