Use this query to delete unused Security records:

Delete from [Article] where convert(varchar, [Article].[DBId]) + '-' + convert(varchar, [Article].[Id]) in
(Select convert(varchar, [Article].[DBId]) + '-' + convert(varchar, [Article].[Id]) from [Article] LEFT JOIN [StockTransfer]
ON ([Article].[Id] = [StockTransfer].[ArticleId] and [Article].[DBId] =[StockTransfer].DBId])
where [StockTransfer].[ArticleId] Is Null and Not [Article].[DBId] = 0)