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. Join them; it only takes a minute:

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

For example, a junction table associating a product and its pictures:

create table product_picture (
  product_id bigint not null references product(id),
  picture_id bigint not null references picture(id),
  some_column int not null

What is a common/conventional, short, general, name for some_column if it represents the display order of the photos?

order, sort, and sequence are out, as they are keywords.

share|improve this question

closed as primarily opinion-based by StanleyJohns, Jon Seigel, dezso, RolandoMySQLDBA, Mat Aug 1 '13 at 18:25

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.If this question can be reworded to fit the rules in the help center, please edit the question.

picture_ordinal?? That's probably what I'd go with, but this is personal preference. – Thomas Stringer Jul 31 '13 at 20:52
I usually use sort_order or display_sequence – a_horse_with_no_name Jul 31 '13 at 21:27
Probably your RDBMS will allow you to still call it order if quoted. I just choose the most appropriate column name and if that happens to be a reserved word quote it. – Martin Smith Aug 1 '13 at 10:01
Ordinal. At least in C# it is the same term used for the running number of fields in the returned data reader. – TomTom Aug 3 '13 at 6:52
up vote 2 down vote accepted

Either "display_order" or "web_display_order", unless you have some hidden requirements. (If you support multiple applications, and each has different display requirements, [application]_display_order makes sense.)

The important part can be abbreviated with "disp" and "ord" in English, as "disp_ord" or "web_disp_ord".

share|improve this answer

It depends on what your philosophy is around column naming.

If you go for very descriptive long column names, then display_order is perfectly fine, since that is exactly what your column contains.

If you are comfortable with shorter names that may seem a little cryptic, but which can be figured out pretty easily, then you could use seq or ord. For English speakers, seq is pretty unambiguous as there aren't a lot of words that this could reasonably represent. I would pick that over ord for that reason.

share|improve this answer

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