ARTICLE

Referential Integrity in SharePoint 2010

Posted by Vijai Anand Articles | SharePoint 2010 March 31, 2011
In this article we will be seeing a new feature called Referential Integrity in SharePoint 2010.
Reader Level:

In this article we will be seeing a new feature called Referential Integrity in SharePoint 2010.

I have created two lists "ParentList" and "ChildList". In the "ChildList" I am creating a lookup column which will take values from "ParentList". When you create a lookup column you can see "Relationship" where you can maintain referential integrity enforcing the relationships defined by lookup columns. Just like foreign key constraints in a relational database, in SharePoint 2010 you can configure restrict delete and cascade delete rules on lookup column relationships:

  • Cascade delete rules: Delete items that reference a record when you delete that record.
  • Restrict delete rules: Will prevent you from deleting a record that is referenced by a lookup column in another list.

Cascade delete:

When an item in the target list is deleted, cascade delete will delete all related items in the list. For example in the parent list I have the following items

Referential1.gif

And in the child list I have the following items

Referential2.gif

I have chosen "Cascade delete" and when I try to delete an item "Java" from the "ParentList" a message will pop up

Referential3.gif

It will delete all the items related to the list.

Once you delete the "Java" item in the parent list, the child list looks like the following.

Referential4.gif

Restrict delete:

It will prevent the deletion of an item in the target list if it has one or more related items in the list.

When you try to delete an item in the parent list you will be getting the following error message

Referential5.gif

Login to add your contents and source code to this article
post comment
     

sure... anbarasan.karthikeyan at gmail dot com

Posted by Karthikeyan Anbarasan Apr 01, 2011

Ya sure Karthi..could you give me ur mail id...

Posted by Vijai Anand Apr 01, 2011

Thanks vijay... if i want to start with Share point 2010... can you please guide with some documents or some good book to start with?

Posted by Karthikeyan Anbarasan Mar 31, 2011

Ya sure Karthi...U got environment to work..So that it would be easy to learn..

Posted by Vijai Anand Mar 31, 2011

Vijai, can you please guide me on how to start with share point. I have basic idea on the share point portal services 2003... i have configured and created a site with that version...

Posted by Karthikeyan Anbarasan Mar 31, 2011
COMMENT USING
PREMIUM SPONSORS
DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and add new content to existing PDF documents from within your applications.
SPONSORED BY
  • PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.
Join a Chapter