Unix Technical Forum

referential integrity

This is a discussion on referential integrity within the SQL Server Data Warehousing forums, part of the Microsoft SQL Server category; --> When implementing a schema for data warehousing is it common practice not to implement referential integrity across the tables ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server Data Warehousing

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 07:07 PM
news.microsoft.com
 
Posts: n/a
Default referential integrity

When implementing a schema for data warehousing is it common practice not to
implement referential integrity across the tables in the database?

If true is it purely for ETL purposes or does it improve query performance
if the referential integrity is not applied to the tables.

Ollie


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 07:07 PM
TheSQLGuru
 
Posts: n/a
Default Re: referential integrity

Most of the sql server implementations (both OLTP and OLAP) I have seen in
my many years of consulting on the product have not had much if any ref.
integrity in place. RF can provide the optimizer with useful information,
yet it also takes overhead to maintain/enforce. And without it you get
fewer application errors - yet allow in bad data. Most designers/developers
seem to take the easy road . . .

--
TheSQLGuru
President
Indicium Resources, Inc.

"news.microsoft.com" <ollie_riches@hotmail.com> wrote in message
news:uIbwJ7zsHHA.400@TK2MSFTNGP02.phx.gbl...
> When implementing a schema for data warehousing is it common practice not
> to implement referential integrity across the tables in the database?
>
> If true is it purely for ETL purposes or does it improve query performance
> if the referential integrity is not applied to the tables.
>
> Ollie
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-27-2008, 07:07 PM
Dave Frommer
 
Posts: n/a
Default Re: referential integrity

Yes, this is very common in a data warehouse. In OLTP databases, DRI is
VERY important to ensure the referential integrity of the data because the
data is coming in from applications and possibly other places. In a data
warehouse, the ONLY way data should ever get into your warehouse is through
your ETL process(es). Since these processes should always do thorough
checking of the data inclusing references, you can safely remove the DRI
since it can speed up the ETL loads. However, I always include it by
default even in warehouses as an extra safety check and only remove it if
needed for the performance boost (only ever had to do this twice in many
years when it involved loading 10's to 100's of millions of rows a night in
a tight window of time.

"news.microsoft.com" <ollie_riches@hotmail.com> wrote in message
news:uIbwJ7zsHHA.400@TK2MSFTNGP02.phx.gbl...
> When implementing a schema for data warehousing is it common practice not
> to implement referential integrity across the tables in the database?
>
> If true is it purely for ETL purposes or does it improve query performance
> if the referential integrity is not applied to the tables.
>
> Ollie
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-27-2008, 07:07 PM
Marco Russo
 
Posts: n/a
Default Re: referential integrity

On Jun 20, 3:27 pm, "news.microsoft.com" <ollie_ric...@hotmail.com>
wrote:
> When implementing a schema for data warehousing is it common practice not to
> implement referential integrity across the tables in the database?
>
> If true is it purely for ETL purposes or does it improve query performance
> if the referential integrity is not applied to the tables.
>
> Ollie


I prefer having referential integrity enabled on the development
environment, removing it in production.
It has the benefit of helping ETL developers finding errors very early
and clearly.

Marco Russo
http://www.sqlbi.eu
http://sqlblog.com/blogs/marco_russo

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-27-2008, 07:07 PM
Jeje
 
Posts: n/a
Default Re: referential integrity

same for me.

yes in dev
no in prod.


"Marco Russo" <marco.russo@loader.it> wrote in message
news:1182449884.703796.298200@n2g2000hse.googlegro ups.com...
> On Jun 20, 3:27 pm, "news.microsoft.com" <ollie_ric...@hotmail.com>
> wrote:
>> When implementing a schema for data warehousing is it common practice not
>> to
>> implement referential integrity across the tables in the database?
>>
>> If true is it purely for ETL purposes or does it improve query
>> performance
>> if the referential integrity is not applied to the tables.
>>
>> Ollie

>
> I prefer having referential integrity enabled on the development
> environment, removing it in production.
> It has the benefit of helping ETL developers finding errors very early
> and clearly.
>
> Marco Russo
> http://www.sqlbi.eu
> http://sqlblog.com/blogs/marco_russo
>


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:03 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com