How do I create a multiple-table check constraint?

后端 未结 4 2127
长情又很酷
长情又很酷 2020-11-30 03:57

Please imagine this small database...

Diagram

removed dead ImageShack link - volunteer database diagram

Tables

Volunteer         


        
4条回答
  •  温柔的废话
    2020-11-30 04:35

    There is a way to do it by using triggers, which i wouldn't recommend. I would recommend not putting your buisness logic at the database level. The db doesn't need to know who, is staffing a certain shift at which time. That logic should be put in your buisness layer. I would recommend using a repository construction pattern. Scott gutherie has a very good chapter in his mvc 1.0 book which describes this (Link below).

    http://weblogs.asp.net/scottgu/archive/2009/03/10/free-asp-net-mvc-ebook-tutorial.aspx

提交回复
热议问题