Elementary key normal form

Uses your system voice; voice and rate in settings.

Snapshot

≈ 2 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

Elementary key normal form (EKNF) is a subtle enhancement on third normal form, thus EKNF tables are in 3NF by definition. This happens when there is more than one unique compound key and they overlap. Such cases can cause redundant information in the overlapping column(s).

Elementary key normal form (EKNF) is a subtle enhancement on third normal form, thus EKNF tables are in 3NF by definition. This happens when there is more than one unique compound key and they overlap. Such cases can cause redundant information in the overlapping column(s).

Example

Consider the following scenario. There is an order process for glasses in which a frame and lens must be specified. The lens product must be a lens and the frame product must be a frame. For this constraint to be maintained, the product type is added to the row for each product. |style="vertical-align:top"| |} In the above scenario, there would be a constraint on FrameProductType and LensProductType where they must be Frame and Lens respectively, and there would be a foreign key relationship to product on both Id and productType for FrameId, FrameProductType and LensId, LensProductType respectively. For this foreign key relationship to work, an "elementary key" must be made on the Product table on Id and Type. This is generally accomplished via a unique key constraint. Without this relationship and constraint, a lens could be selected for the frame and a frame for the lens.

Notes

References

Text derived from https://en.wikipedia.org/w/index.php?oldid=1376092776 under CC BY-SA 4.0; modifications have been made.

Sources cited in this revision

1 named source(s) extracted from the cited revision. A source with no author is shown by its publication; nothing is invented.