views:

82

answers:

2

The company Microsoft could be referred as "microsoft", "ms" or "m$" etc. We may say these names are alias to one single identity. If you want to store the "alias" relationship, you might have to do it as the following pairs

microsoft      ms 

ms             microsoft

microsoft      m$

m$             microsoft

ms             m$

m$             ms

Or maybe there's a better approach?

+1  A: 

You can accomplish this with a "TAG" schema.

interest
--------
iPK
value

junction
---------
iPK
aPK

alias
-------
aPK
value
jms
+2  A: 

Sure. Don't store a table that shows a bunch of aliases. Instead have each company given one ID number, and use a secondary table to provide the aliases:

Company table

CompanyID  PreferredNameID
12345      934

Name table

CompanyID  NameID  Alias 
12345      934     Microsoft
12345      384     M$
12345      823     MS

This gives you the ability to have as many aliases as needed, and when you make reports on the company you will reference the preferred name.

Adam Davis