Search code examples
databaseschemamappingaliasrelational

relational database and net structure


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?


Solution

  • You can accomplish this with a "TAG" schema.

    interest
    --------
    iPK
    value
    
    junction
    ---------
    iPK
    aPK
    
    alias
    -------
    aPK
    value