USE SQL2008SBSFS
GO
CREATE TRIGGER tiu_productdocuments ON Products.ProductDocument
FOR INSERT, UPDATE
AS
IF EXISTS (SELECT 1 FROM SQL2008SBS.Products.Product a
            INNER JOIN inserted b ON a.ProductID = b.ProductID)
BEGIN            
    RETURN
END    
ELSE
BEGIN
    ROLLBACK TRANSACTION
    RAISERROR('Violation of foreign key',16,1)
END                
GO

USE SQL2008SBS
GO

CREATE TRIGGER td_product ON Products.Product
FOR DELETE
AS
IF EXISTS (SELECT 1 FROM SQL2008SBSFS.Products.ProductDocument a
            INNER JOIN deleted b ON a.ProductID = b.ProductID)
BEGIN
    ROLLBACK TRANSACTION
    RAISERROR('You must first delete all documents for this product',16,1)
END                
ELSE
BEGIN            
    RETURN
END    
GO