Re: Question regarding view
- From: DA Morgan <damorgan@xxxxxxxxx>
- Date: Thu, 20 Apr 2006 09:27:52 -0700
Mangood wrote:
Hi everyone
I'm building datawarehouse using classical star schema. I have
dimension called sellto_dim and second dimension called shipto_dim
which is identical as sellto_dim. My idea is to create only view based
on sellto_table instead of creating second physical table. The question
is if it's possible to add primary key constraint to view and connect
it with foreign key in fact table.
Thanks in advance.
It is possible but it won't do what you want.
First of all if this is a data warehouse you don't need any primary
keys. Referential integrity in the data, coming from your OLTP systems,
should be assured and not DML should be taking place.
You may need constraints, or their indexes, for the optimizer to help
it make good choices but that is quite another matter.
I'd suggest you drop your idea and revisit the design. Two identical
dimensions? Why? (and yes I did read your explanation).
--
Daniel A. Morgan
http://www.psoug.org
damorgan@xxxxxxxxxxxxxxxx
(replace x with u to respond)
.
- Follow-Ups:
- Re: Question regarding view
- From: Anurag Varma
- Re: Question regarding view
- References:
- Question regarding view
- From: Mangood
- Question regarding view
- Prev by Date: Re: SQL question
- Next by Date: Re: overlapping "select for update" statements
- Previous by thread: Question regarding view
- Next by thread: Re: Question regarding view
- Index(es):
Relevant Pages
|