• You always want to pass in the data at the lowest level. I assume that you have indexed the mid and pid in the middle table, you'd use those for querying.

    When you say pass in, I assume you mean that you have a stored procedure. That's the best way for you to write standard queries, and if you are calling these with .NET stored procedure objects, you prevent SQL Injection issues.

    In that case, to get the models for a product you'd do something like

    create procedure GetModels

    @productID int

    as

    select pid, id, model

    from master_model

    where pid = @ProductID

    return

    A view is like a table. You don't "pass" in values. If you had a view, say called ModelView, you'd query it

    select pid, id, model

    from modelview

    where pid = 1003

    You could use that view in a stored procedure, as another table.

    If you want to insert values, note that you cannot insert through a view to more than one table. Which means you'd need 3 separate inserts through the view to populate all 3 tables. That might not be a big deal as you'll typically populate products less than models, and markets less than products.