Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Delete/Insert vs Update on look up table

Author  Topic 

John Sourcer
Yak Posting Veteran

91 Posts

Posted - 2008-01-15 : 09:19:47
Hi Gurus,

Advice if possible. I have a table of items with properties. I store the properties in a lookup table as follows:

Products
ID| OBJECT
1 | Banana
2 | Apple
3 | Tomato

Properties
ID| Property
1 | Fruit
2 | Vegetable
3 | Sweet

ProductsProperties
ID | ProductID | PropertyID
1 | 2 | 1
2 | 2 | 3

In ProductsProperties is it better to Delete/Insert or check for exists and then delete or add?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-01-15 : 09:23:23
How will you be performing insert/deletes?
Go to Top of Page

rohitkumar
Constraint Violating Yak Guru

472 Posts

Posted - 2008-01-15 : 09:23:28
ok so what I understood is that your Apple is a Fruit and is Sweet, what next?
Go to Top of Page
   

- Advertisement -