Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Database normalization
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Satisfying ETNF === Suppose the franchisees can also order books from different suppliers. Let the relation also be subject to the following constraint: * If a certain '''supplier''' supplies a certain '''title''' * and the '''title''' is supplied to the '''franchisee''' * and the '''franchisee''' is being supplied by the '''supplier,''' * then the '''supplier''' supplies the '''title''' to the '''franchisee'''.<ref name=":2">{{Cite book|url=https://books.google.com/books?id=Jx5UCwAAQBAJ&q=etnf%20normalization&pg=PT138|title=The New Relational Database Dictionary: Terms, Concepts, and Examples|last=Date|first=C. J.|date=December 21, 2015|publisher="O'Reilly Media, Inc."|isbn=9781491951699|pages=138|language=en}}</ref> {| class="wikitable" |+Supplier - Book - Franchisee !<u>Supplier ID</u> !<u>Title</u> !<u>Franchisee ID</u> |- |1 |Beginning MySQL Database Design and Optimization |1 |- |2 |The Relational Model for Database Management: Version 2 |2 |- |3 |Learning SQL |3 |} This table is in [[Fourth normal form|4NF]], but the Supplier ID is equal to the join of its projections: '''<nowiki>{{Supplier ID, Title}, {Title, Franchisee ID}, {Franchisee ID, Supplier ID}}</nowiki>.''' No component of that join dependency is a [[superkey]] (the sole superkey being the entire heading), so the table does not satisfy the [[Essential tuple normal form|ETNF]] and can be further decomposed:<ref name=":2" /> {| | {| class="wikitable" |+Supplier - Book !<u>Supplier ID</u> !<u>Title</u> |- |1 |Beginning MySQL Database Design and Optimization |- |2 |The Relational Model for Database Management: Version 2 |- |3 |Learning SQL |} | {| class="wikitable" |+Book - Franchisee !<u>Title</u> !<u>Franchisee ID</u> |- |Beginning MySQL Database Design and Optimization |1 |- |The Relational Model for Database Management: Version 2 |2 |- |Learning SQL |3 |} | {| class="wikitable" |+Franchisee - Supplier !<u>Supplier ID</u> !<u>Franchisee ID</u> |- |1 |1 |- |2 |2 |- |3 |3 |} |} The decomposition produces ETNF compliance.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)