Say, we have a set of records that should be ordered with a non-trivial ordering method, e. g. natural sort or just in some specific sequence, defined by a user. We have to introduce a special column intended just for ordering.
Is there a more or less common convention for naming such columns? What names do you use?
The generic standards for the column naming are as follows: Column names must contain only A to Z, 0 to 9, and underscore (_) characters. Column names can contain multiple underscores. The column name must not be very generic.
What is an example of a good naming convention? Good naming examples include: [Project number] - Data Use Agreement - [Title of research project] Approval - Change to employee travel policy - February 2014.
Naming conventions are a set of guideline that make strong foundations for such a consistent system. These guidelines ensure that the names of database entities are readable, easy to use in queries and do not collide with names of other defined entities or keywords.
I'd use SortOrder
over sequence
, for the sake that sequences are by some vendors (Oracle, PostgreSQL) to provide auto increment/identity functionality. SortOrder is more obvious/explicit about what the column is being used for.
I have seen Sequence
used as well as SortOrder
. Personally I like Sequence
better, as it implies uniqueness.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With