Take the 2-minute tour ×
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.

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
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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.