Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Question regarding view
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_at_x.washington.edu (replace x with u to respond)Received on Thu Apr 20 2006 - 11:27:52 CDT
![]() |
![]() |