Wednesday, March 21, 2012

Referential Integrity Constraints w/o Referential Integrity in the db?

Using the new referential integrity constraints that will be made available, will it allow us to manually define the relationships between entities even if there is no true foreign key constraints setup in the database?

Lets say we deleted the FK_Orders_Customers in Northwind between orders and customers.

Or is this ability available now?

Thank for your time.

Using a TRIGGER, you can define just about any type of constraint you desire.

However, the referential constraints (PK-FK) will still require relationships between tables.

|||

The problem that I have is that we are working with a highly denormalized database so true constraints on all of our tables are not really an option at the moment.

If we are really trying to abstract the programming level away from the data layer than we should be able to define entities in the EDM as well as their relationships entirely. It would seem that triggers and foreign key contraints are not necessary at the database level (despite how preferable they might be). Is this an option currently?

Thanks

... Sorry, it appears that I posted this to the wrong forum. It should have been in the ADO.NET Orcas forum. My apologies.

No comments:

Post a Comment