Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > How To...
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 31st May 15:21
naran hirani
External User
 
Posts: 1
Default How To...



Hi,

My colleague is currently struggling over the following problem:

He has a table: parts(name, description, ...), the column in this table
`name' appears to have several aliases. For example, part A may be
referred to by `nameA', `nameB', or `nameC', etc.

What he would like to do is to retrieve the correct row(s) from the
parts table irrespective of which alias the user enters during the
initial query.

Can any one suggest a really good, efficient, way of retrieving data of
this type in this way?

My initial thoughts were to create a seperate alias table and populate
it with the part names and their aliases. For example:
alias(primaryName, aliasName). Then joining the parts and alias table on
alias.primaryName = parts.name would allow the alias.aliasName to be
queried with the end user search criteria and return the correct row(s)
from the parts table.

I think this would work with some provisos e.g. each part name _must_
appear in the alias table even when no other alias exists, etc.

Many thanks.
Naran.
  Reply With Quote


  sponsored links


2 31st May 15:21
naran hirani
External User
 
Posts: 1
Default How To...



Hi,

My colleague is currently struggling over the following problem:

He has a table: parts(name, description, ...), the column in this table
`name' appears to have several aliases. For example, part A may be
referred to by `nameA', `nameB', or `nameC', etc.

What he would like to do is to retrieve the correct row(s) from the
parts table irrespective of which alias the user enters during the
initial query.

Can any one suggest a really good, efficient, way of retrieving data of
this type in this way?

My initial thoughts were to create a seperate alias table and populate
it with the part names and their aliases. For example:
alias(primaryName, aliasName). Then joining the parts and alias table on
alias.primaryName = parts.name would allow the alias.aliasName to be
queried with the end user search criteria and return the correct row(s)
from the parts table.

I think this would work with some provisos e.g. each part name _must_
appear in the alias table even when no other alias exists, etc.

Many thanks.
Naran.
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666