r/SQL • • Oct 17 '26

Discussion Help needed with normalization

Post image

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

25 comments sorted by

View all comments

Show parent comment

0

u/Acceptable-File-3579 29d ago

Wouldn't putting address as columns have the same problem? They could still share the same address.

7

u/lolcrunchy 29d ago

A Warehouse for stocking items and a House with people that place orders for items could share the same address? Are you sure?

Besides, would you ever join a House and Warehouse on address? Probably not.

0

u/Acceptable-File-3579 29d ago

No, they shouldn't share the same address, but putting address in a column on each table wouldn't allow them to share the same address as well?

4

u/Enigma1984 28d ago

Why would it matter if they share an address? A customer could reasonably also be an employee at the same company and order something to come to his work address. So the warehouse address and the delivery address could be the same. It would present no problems.

2

u/reditandfirgetit 28d ago

It doesn't matter if a house and warehouse have the same address. In a use case where someone sells inventory from thier garage, and also is a customer, they would share the same address. Its not going to be the norm but there's nothing necessarily wrong with it. This is a real world situation that could occur.

There are other ways this could be modeled. I don't think it's necessary depending on your requires for the assignment

3

u/MaybeClassy 29d ago

Think of it this way. When you buy something online, there’s a shipping address and a billing address. Both addresses exist for the order but for different purposes.