Storing Values in colunms alphabetic?

Posted by Mdillion on Stack Overflow See other posts from Stack Overflow or by Mdillion
Published on 2011-01-01T00:47:57Z Indexed on 2011/01/01 0:53 UTC
Read the original article Hit count: 141

Filed under:
|

Is there any benefit to storing content alphabetic in columns? Maybe make lookups faster? If yes then when i add new lookup values to my tables do i need to rebuild the PK for the looup values to fit in the new text? Say a table like this:

City_tbl
city_id: example: 1120
City_name: example: New York.

If I need to add Chicago to it, do i add it at the bottom of the list with the next ID which may be 2000 or do i inset it after the city in alphabetic order which would mean I need to update the PK Id of all following IDs by 1.

Only benefit I know about is when I have to manually add lookup values without quering the database I can quickly check the lookup value list for exiting items with ease. But not sure if it may make lookups faster or something if the system knows the text is in aplhabetic order.

© Stack Overflow or respective owner

Related posts about database

Related posts about schema