| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Schema Relationship Question
"JamesHoward" <James.w.Howard_at_gmail.com> wrote in message
news:1191447896.562688.246640_at_r29g2000hsg.googlegroups.com...
>I have a set of predefined constants with a set of predefined
> relationships and am looking for a way to link them if possible to
> ensure data integrity.
>
> An example would be if I wanted to keep track of programs and I have a
> table Programs with rows operating system type and programming
> language. If both operating system type and programming language are
> foreign keys to reference tables (just tables with a primary key and a
> name to the element they are referencing) is there a way to ensure
> data integrity for possible nonsensical pairings such as programming
> language c# and operating system unix?
>
> Thanks in advance,
> Jim Howard
>
That could be four tables for example. The constraint you refer to would be a referential constraint between Programs and ValidPrograms.
Programs {os, language}
ValidPrograms {os, language}
OS {os}
Language {language}
-- David PortasReceived on Wed Oct 03 2007 - 19:27:35 CDT
![]() |
![]() |