Re: Duplicates Processing
От | Rob Sargent |
---|---|
Тема | Re: Duplicates Processing |
Дата | |
Msg-id | 4CAF8E64.8010000@gmail.com обсуждение исходный текст |
Ответ на | Re: Duplicates Processing (Gary Chambers <gwchamb@gmail.com>) |
Ответы |
Re: Duplicates Processing
|
Список | pgsql-sql |
Yes. With this you can find all part numbers/supplies which match your value, wattage criteria in one table. Or exclude any which have a non-null is_replacement_for value. If you need to drop the "replaceable" variant, you choose which of the replacements to promote and update the others to match the new "replaceable". They're all instances of the same type of thing so in my view they ought to live in the same table. Also possible to maintain the replacement structure via a (self) join record with replacable/is_replacement_for tuples. You have a similar but slightly more involve maintenance issue of course. On 10/08/2010 02:42 PM, Gary Chambers wrote: > Rob, > >> Perhaps a trade off between nullable fields and redundant types. If >> your original table simply had a nullable column called >> isReplacementFor, into which you place in the subsequent rows the id of >> the first instance found. > > Am I misunderstanding you when you're suggesting a table like: > > part_number INTEGER > is_replacement_for INTEGER references part_number > value INTEGER > wattage FLOAT8 > ... > > -- Gary Chambers
В списке pgsql-sql по дате отправления: