DataSet中的Constraint是对表(DataTable)约束,它为表中的数据添加更多的限制。比如必须唯一,或者必须在另外一张表中存在等。您可以参考以下文章为表添加约束。
Adding Constraints to a Table
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconaddingconstraintstodataset.asp
而Relations是指在DataSet中表之间的关系,它为DataSet中的表创建的关联。在默认的情况下,如果您为两张表创建关联,那么父表的关联字段被添加了UniqueConstraint的约束,子表的关联字段被添加了ForeignKeyConstraint的约束。您可以参考以下文章学习为DataSet添加关系。
Adding a Relationship between Tables
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconaddingconstraintstodataset.asp