Re: FK to a view?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Anith Sen (anith_at_bizdatasolutions.com)
Date: 07/20/04


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


Relevant Pages

  • Re: Databinding - Best Practice (object-oriented)
    ... >>relational model throughout your application severely restricts the ... The Relational Model is not SQL. ... difficult to persuade developers to ditch the database independance this ... What SQL domains should be but they are not. ...
    (microsoft.public.dotnet.framework.windowsforms.databinding)
  • Re: Databinding - Best Practice (object-oriented)
    ... >>relational model throughout your application severely restricts the ... The Relational Model is not SQL. ... difficult to persuade developers to ditch the database independance this ... What SQL domains should be but they are not. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: OO vs. RDB challenge
    ... in practice its outweighed by the unfortunate fact that SQL ... > The Relational Model is the best possible layer, ... constraints of the RDBMS" is an attractive idea in theory, ... RDBMS in some other language and show its as easy as using an RDBMS". ...
    (comp.object)
  • Re: The best elegant solution to override 65k rows limit in a sheet
    ... >through heavy customization of business apps (i mention SAP, Oracle, ... >Peoplesoft etc...). ... >YOU ACTUALLY THINK THAT THE RELATIONAL MODEL LETS YOU DOWN BECAUSE YOU ... in the real world we have SQL. ...
    (microsoft.public.excel)
  • Re: SQL
    ... >>>solution to persistence access that is designed around a particular ... > create a RAM-based RDB and use SQL to access it with no persistence. ... You agree that the relational model is not only about persistence? ...
    (comp.object)