Re: FK to a view?
From: Anith Sen (anith_at_bizdatasolutions.com)
Date: 07/20/04
- Next message: Pankaj Agarwal [MSFT]: "Re: Import data from csv file to a table or multiple tables"
- Previous message: Joe Celko: "Re: United States Regional Data"
- In reply to: Ian Boyd: "FK to a view?"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 20 Jul 2004 11:13:24 -0500
>> So if a table and view should be indisguishable, why can i not create a
foreign key to a view; as i can to a table? <<
You do have a good point. To derive practical benefits, in a relational
database one must be able to impose sufficient integrity constraints
including DRI on all relations, i.e. in all base tables, views, snapshots,
derived tables etc.
However SQL does not fully and faithfully conform to relational model and
thus its capabilities are limited. Since a view in SQL is not fully
implemented in accordance with a view in relational model, the facility to
create a foreign key on a view cannot be provided in SQL.
However, while accessing a view for data retrieval purposes, it should
behave like a base table even in SQL.
-- Anith
- Next message: Pankaj Agarwal [MSFT]: "Re: Import data from csv file to a table or multiple tables"
- Previous message: Joe Celko: "Re: United States Regional Data"
- In reply to: Ian Boyd: "FK to a view?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|