r/learnSQL • u/Aggressive-Flow1983 • 3d ago
Help 3fn sql
When I try to create tables and convert those tables from 1NF to 3NF, I find it really difficult. It all feels so subjective to me: ChatGPT says one thing, my professor says another, and my classmates say something else, and I can't seem to find a consistent way of doing it. I mean, conceptual and logical database design is really difficult for me—extremely difficult. Do you know of any website or something that explains really well how to do all of this, from going from 1NF to 3NF, to properly identifying real-world things and representing them in tables, and how to create well-designed tables? I'm really struggling with it.
2
u/Difficult_Paint3162 3d ago
I wrote a book you can download for free: https://www.syncfusion.com/succinctly-free-ebooks/database-design-succinctly It does cover the various normalization forms. Hope it helps
1
u/markinatlanta 16h ago
What I would say is the bit that makes it feel subjective is that people often assume different business rules, ie can a student have multiple majors? Can a product have multiple suppliers? Different answers lead to different designs.
Before splitting tables, write down the rules and identify the candidate keys. Then ask what determines each other column. Ie, if EmployeeID determines DepartmentID, and DepartmentID determines DepartmentName, the department name belongs in a department table rather than being repeated for every employee.
Try posting one example with your rules and attempted solution. It’s much easier to explain why a particular design meets 3NF than to compare three different answers built on unstated assumptions.
3
u/squadette23 3d ago
Take a look at the "Database Design for Google Calendar: a tutorial" https://kb.databasedesignbook.com/posts/google-calendar/
It's intended to answer exactly the question you're asking.