0

I have a problem with my database.

Basically I am turning the title of a business into ID.

One way to do it is to get rid alphanumeric

My primaryid must not contain nonalphanumeric. But, japan, chinese, korean language contain nonalphanumeric.

what should i do with that?

I think a good approach is to allow any string except "special characters" as id in dataabase

can I know what kind of strings I should get rid and how do I get rid those strings with vb.net

Basically I want all of my databases to be able to contain all kind of glyps including chinese, korea, japanese, etc.

I want "the same character" to be represented by the same glyph. For example, A and a is the same. '‘’ "“”

What's the approach I should use in making the IDs?

user4951
  • 32,206
  • 53
  • 172
  • 282
  • Why don't you just use UTF8 and have your business ID's to be whatever the user typed in? On the other hand, I personally would never use title of a business for any sort of an ID. – N.B. Feb 29 '12 at 10:31
  • do you mean deciding on a format for the database primary key? See : http://stackoverflow.com/questions/590442/deciding-between-an-artificial-primary-key-and-a-natural-key-for-a-products-tabl – J... Feb 29 '12 at 10:33
  • well some characters need to be normalized. for example, A should be a. Also “” should be just " – user4951 Feb 29 '12 at 10:38

1 Answers1

1
  1. Can you guarantee that the title can be unique? Is this column already set as unique? Using strings can be tricky especially with multiple character sets

  2. An alternate option would be to use an integer auto increment field, then format the values using padding or the number itself. If you do not expect very many businesses, you can start from a large value liek 123456789 and the IDs are immediately available for use.

Stephen Senkomago Musoke
  • 3,528
  • 2
  • 29
  • 27
  • yes. it'll be unique because I also add latitude and longitude. when the id is exactly the same, it's actually a good indicator that we're dealing with the same businesses. – user4951 Mar 01 '12 at 03:58