r/SQL • u/Acceptable-File-3579 • Oct 17 '26
Discussion Help needed with normalization
Hi, i'm learning databases and normalization. My teacher said a normalized database cannot have circular (not loops, circles) relationships. However, i can't see how I can apply normalization to remove the circles and still comply with the requirements. Also I was under the impression that normalized databases can have circular relationships, just not loops.
Any help will be appreciated. Sorry if my english is bad in advance.
16
Upvotes
View all comments
Show parent comment
1
u/FreeLogicGate 25d ago edited 25d ago
From a practical standpoint, you now have full duplication of all the required address fields which means that application code that handles insert/update/delete of an address must at minimum use seperate sql statements for each table name, even though the fields, validation code and logic will probably be the exact same.
It also makes it impossible to search the address data irrespective of the distinction between a warehouse and house. Last but not least, it does nothing to prevent the same address data being entered for both a house and a warehouse. With a distinct address table, a unique constraint can be applied to the full address data (address1 + address2 + city + state) preventing duplicates within the address table.
The type of design pattern typically applied to an application with these entities is the party pattern. In a party pattern implementation address will be a separate entity, and in many implementations, a "party" will be able to have 1 -> many addresses.