DjangoCon US 2018 - "Normalize until it hurts; denormalize until it works"... by Flávio Juvenal

Channel:
Subscribers:
42,400
Published on ● Video Link: https://www.youtube.com/watch?v=kAYe6qhBz0s



Duration: 0:00
62 views
0


DjangoCon US 2018 - "Normalize until it hurts; denormalize until it works" in Django by Flávio Juvenal

There’s a good practice that says “a database is a representer of facts”. If there’s more than one way to extract a single fact from the database, then there’s a redundancy in it. Every redundancy can cause different anomalies in the data, which in turn cause bugs in the application. To avoid that, there’s a process called normalization, which involves following sets of rules to restructure the database to remove redundancies without losing the original facts. The traditional set of normalization rules are the so-called Normal Forms: First Normal Form, Second, Third, etc. Unfortunately, those are frequently overlooked by developers due to their excessive formalism. But in fact, even the Normal Forms aren’t enough to avoid anomalies, since they’re concerned about redundancies only in a single table*. Since cross-table dependencies are very common in modern applications, we must go beyond normal forms to prevent problems.

In this talk, we’ll present normalization rules on a friendly language, going beyond normal forms. We’ll understand how the software requirements cause dependencies in database tables, both in-table and cross-tables. We’ll show real examples of non-trivial dependencies that happen on Django models. We’ll discuss how normalization prevents redundancies, inconsistencies, anomalies, and bugs. Knowing that normalization can cause slowdowns in queries, we’ll present how to increase performance with denormalization, which is not the same of not normalizing. Instead, denormalization means being able to represent data in multiple ways to speed up queries without introducing inconsistencies. We’ll discuss Django-related denormalization tools that use cronjobs, indexes, caching, materialized views and triggers, and NoSQL.

*It’s common to ignore the fact that normal forms only discuss redundancies inside a single table/record/relval. More about this in this article reviewed by Codd, Fagin and Date, key figures of the relational model.




Other Videos By Confreaks


2022-04-08DjangoCon US 2018 - Django REST Framework: Moving Past the Tutorial to Production by Drew Winstel
2022-04-08DjangoCon US 2018 - Keynote with Mariatta Wijaya
2022-04-08DjangoCon US 2018 - Building a Community for All People by Jennifer Konikowski
2022-04-08DjangoCon US 2018 - We Are 3000 Years Behind... by Hayley Denbraver
2022-04-08DjangoCon US 2018 - Python on your phone: Building mobile apps with Kivy by Derek Payton
2022-04-08DjangoCon US 2018 - One Engineer, an API, and an MVP... by Nicole Zuckerman
2022-04-08DjangoCon US 2018 - When your wetware has too many threads... by Aaron Bassett
2022-04-08DjangoCon US 2018 - Here Come The Robots - Django and Machine Learning by Tom Dyson
2022-04-08DjangoCon US 2018 - Finally Understand Authentication in Django REST Framework by William S. Vincent
2022-04-08DjangoCon US 2018 - What's in a Name? Your Guide to the Wacky World of DNS by Ashley Sullins
2022-04-08DjangoCon US 2018 - "Normalize until it hurts; denormalize until it works"... by Flávio Juvenal
2022-04-08DjangoCon US 2018 - Fundamentals of Kubernetes for Django developers by Graham Dumpleton
2022-04-08DjangoCon US 2018 - Serverless Django with Zappa by Dane Hillard
2022-04-08DjangoCon US 2018 - JavaScript for Python Developers by Žan Anderle
2022-04-08DjangoCon US 2018 - Introduction to Django and GraphQL by Patrick Arminio
2022-04-08DjangoCon US 2018 - Simpl framework, big impact! by Joseph Lee & Jane Eisenstein
2022-04-08DjangoCon US 2018 - Lightning Talks Day 2
2022-04-08DjangoCon US 2018 - Keynote by Anna Makarudze
2022-04-08DjangoCon US 2018 - Your web framework needs you! by Carlton Gibson
2022-04-08DjangoCon US 2018 - Becoming a Multilingual SuperHero in Django by Sanyam Khurana
2022-04-08DjangoCon US 2018-A Bossy Sort of Voice: Uncovering Gender Bias in Harry Potter by Eleanor Stribling