Showing posts with label common. Show all posts
Showing posts with label common. Show all posts

Wednesday, March 21, 2012

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.
OllieMost 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
>|||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
>|||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|||same for me.
yes in dev
no in prod.
"Marco Russo" <marco.russo@.loader.it> wrote in message
news:1182449884.703796.298200@.n2g2000hse.googlegroups.com...
> On Jun 20, 3:27 pm, "news.microsoft.com" <ollie_ric...@.hotmail.com>
> wrote:
> 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
>sql

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
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:
> 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
>

Wednesday, March 7, 2012

Redundant Databases

I am trying to architect a system that will will have one or more machines
clustered together. The machines must share a common site database between
them. I assume that one machine at any one time should manage the site
database. If the machine that manages the site database fails, then another
system online, it doesn't matter which, should take over the site manager's
duties. It is acceptable if the first machine online would assume the site
manager's duties initally. The machines are essentually peer to peer, but
someone must manage the common database. Is SQL Server Replication the best
way to do this? Is there other, simpler or better ways to do this?
Database Mirroring or clustering are ideal for this. If you have an
intelligent client which will do automatic failover to the active node Log
Shipping or Clustering will also work.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"dbaechtel" <dbaechtel@.nospam.com> wrote in message
news:F754791D-082E-49C9-A8F6-7A205E9B4083@.microsoft.com...
>I am trying to architect a system that will will have one or more machines
> clustered together. The machines must share a common site database between
> them. I assume that one machine at any one time should manage the site
> database. If the machine that manages the site database fails, then
> another
> system online, it doesn't matter which, should take over the site
> manager's
> duties. It is acceptable if the first machine online would assume the site
> manager's duties initally. The machines are essentually peer to peer, but
> someone must manage the common database. Is SQL Server Replication the
> best
> way to do this? Is there other, simpler or better ways to do this?
|||If you are looking for pure hardware redundancy, clustering is a better
choice. If you want to make the data redundant as well, then you need to go
with an additional technology. In SQL Server 2000 you could use either log
shipping or replication. In SQL Server 2005, you can add database mirroring
to that list.
"dbaechtel" <dbaechtel@.nospam.com> wrote in message
news:F754791D-082E-49C9-A8F6-7A205E9B4083@.microsoft.com...
>I am trying to architect a system that will will have one or more machines
> clustered together. The machines must share a common site database between
> them. I assume that one machine at any one time should manage the site
> database. If the machine that manages the site database fails, then
> another
> system online, it doesn't matter which, should take over the site
> manager's
> duties. It is acceptable if the first machine online would assume the site
> manager's duties initally. The machines are essentually peer to peer, but
> someone must manage the common database. Is SQL Server Replication the
> best
> way to do this? Is there other, simpler or better ways to do this?