Is it just down to preference for whether to use a View or a stored procedure (or TVF) to simply return data joined from multiple base tables?
Is there any best practice regarding this? Should a stored procedure be used just for manipulating data? And is it best to use a view for the purpose of returning data from multiple tables?
Are there also likely to be any performance issues?
Query:
SELECT
t.TagID, t.TagName,
t.IsActive AS 'IsTagActive',
tk.TaskID, tk.TaskName,
tk.IsActive AS 'IsTaskActive',
g.GroupID, g.GroupName
FROM
Model.[Tag] t
INNER JOIN
Model.[TagTaskMapping] ttm ON ttm.TagID = t.TagID
INNER JOIN
Model.[Task] tk ON tk.TaskID = ttm.TaskID
INNER JOIN
Model.[Group] g ON g.GroupID = t.GroupID