Referential Integrity

Posted by Community Admin on 04-Aug-2018 13:46

Referential Integrity

All Replies

Posted by Community Admin on 14-Jun-2011 00:00

Hi,

I developed a custom membership provider who can create users under conditions. And during my tests, I encounter a referential integrity problem on the database.

On datatable [sf_user_link] there is no constraints. By code with standard method's provider, I can successfully link role to non existing user...

Regards,
Nicolas

Posted by Community Admin on 16-Jun-2011 00:00

Hi Nicolas,

Indeed there are no constraints in the database. We maintain the integrity inside our code. Does the lack of such constraints interfere with the logic in your custom provider?

Greetings,
Lubomir Velkov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 16-Jun-2011 00:00

Not really but it can be dangerous and totally invisible when we realize custom's development on Sitefinity.
I see it because my membership provider doesn't save the generated user in database, and link it to role in [sf_user_link].

For each development who generate sitefinity items it potentially corrupt data in our database. And we have to be sure code source works perfectly before use manager method SaveChanges().

Regards,
Nicolas

Posted by Community Admin on 17-Jun-2011 00:00

Hi Nicolas,

Usually we handle this by using transactions - this ensures the data integrity and prevents orphan records from occurring. None of the tables in our model have any restraints, everything is handled via transactions.

All the best,
Lubomir Velkov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed