SlideShare une entreprise Scribd logo
1  sur  13
Golden Database Design Rule:
Normalize till it hurts
Denormalize till it works
Denis Reznik
Data Architect at Intapp, Inc.
Microsoft Data Platform MVP
http:/reznik.uneta.com.ua
@denisreznik
Database History
1960s 1970s 1980s 1990s 2000s Nowadays
Object
Databases
RDMS
Commercial
Success
SQL
RDBMS
Ingress
System R
E.F. Codd’s
Paper
CODASYL
IMS
NoSQL
(Johan Oskarsson)
(?)
Google BigTable
Paper
Amazon
Dynamo Paper
Id UserId Name Date
1 1 Work 07/03/2014
2 2 Test 09/09/2015
4 2 Rest 12/08/2015
Id Name Phone
1 Bill +380678455732
2 John NULL
3 Mike +380501233427
Matter Client
Relations (Tables)
Attribute (Column)
Tuple (Row)
Relational Model
Normalization
• Normalization is the process of organizing the columns (attributes) and tables
(relations) of a relational database to minimize data redundancy
Redundancy ComplexityTable Count
Company User Phone Phone Type
Microsoft John Dow +380969785732 NULL
Microsoft John Dow +32345409123 NULL
Microsoft Larry McGregor +45678904692 NULL
Oracle Corp. John Snow +380988958371 NULL
Amazon Jack Snack +23348902385 Home
Amazon Jack Snack +69058763287 Work
First Normal Form (1NF)
• Each cell contains an atomic value
Company User Phone
Microsoft John Dow Tel1: +380969785732, Tel2: +32345409123
Microsoft Larry McGregor Tel: +45678904692
Oracle Corp. John Snow +380988958371
Amazon Jack Snack Home: +23348902385 Work: +69058763287
MattersMatters
Second Normal Form (2NF)
• Table has a Key (Key = Primary Key)
• All non-key columns of the relation are depend from a a whole Key
Matters
Company User Company Address Manager
Microsoft John Dow Redmond Jane Daw
Microsoft Duncan MacLeod Redmond John Dow
Microsoft John Snow Redmond TonyStark
Oracle Corp. John Dow California Rick Brick
Amazon Jack Snack Seattle George Black
Google Dale Cooper California Diana Smith
User Company Manager
John Dow Microsoft Jane Dow
Duncan MacLeod Microsoft John Dow
John Snow Microsoft Tony Stark
John Dow Oracle Corp. Rick Brick
Jack Snack Amazon George Black
Dale Cooper Google Diana Smith
Company Address
Microsoft Redmond
Oracle Corp. California
Amazon Seattle
Google California
ClientsKey: (Client, Matter)
Second Normal Form (2NF)
• Table has a Key (Key = Primary Key)
• All non-key columns of the relation are depend from a a whole Key
Matters
Company User Company Address Manager
Microsoft John Dow Redmond Jane Daw
Microsoft Duncan MacLeod Redmond John Dow
Microsoft John Snow Redmond TonyStark
Oracle Corp. John Dow California Rick Brick
Amazon Jack Snack Seattle George Black
Google Dale Cooper California Diana Smith
User Company Manager
John Dow Microsoft Jane Dow
Duncan MacLeod Microsoft John Dow
John Snow Microsoft Tony Stark
John Dow Oracle Corp. Rick Brick
Jack Snack Amazon George Black
Dale Cooper Google Diana Smith
Company Address
Microsoft Redmond
Oracle Corp. California
Amazon Seattle
Google California
ClientsKey: (Client, Matter)
Third Normal Form (3NF)
• Every non-prime attribute of Relation is non-transitively dependent
on every Key of Relation
Matters
Company User Manager Manager Age
Microsoft John Dow Peter Parker 23
Microsoft Patrik Jones Steven Wu 45
Microsoft Jackie Adams Steven Wu 45
Oracle Corp. Ashley Grey John James 67
Amazon Scott McMillan John Smith 34
Amazon Mary Smith John Smith 34
Key: (Client, Matter)Matters
Company User Manager
Microsoft John Dow Peter Parker
Microsoft Patrik Jones Steven Wu
Microsoft Jackie Adams Steven Wu
Oracle Corp. Ashley Grey Jean Claude
John Smith Scott McMillan John Smith
Adam Gram Mary Smith John Dow
Attorneys
Manager Manager Age
Peter Partner 23
Steven Wu 45
Jean Claude 67
John Smith 34
Fourth Normal Form (4NF)
• Eliminates independent many-to-one relationships between columns
Matters
Id Company Consultant
1 Microsoft Peter Partner
2 Microsoft John Dow
3 Microsoft Amy Chen
4 Oracle Jim Beam
5 Amazon John Snow
6 Google John Snow
Matters
Id Company
1 Microsoft
2 Oracle
3 Amazon
4 Google
Attorneys
Id Consultant
1 Peter Partner
2 John Dow
3 Amy Chen
4 Jim Beam
5 John Snow
MatterAttorneys
CompanyId ConsultantId
1 1
1 2
1 3
2 4
3 5
4 5
Foreign Keys
Users
User Company Manager
John Dow Microsoft Jane Dow
Duncan MacLeod Microsoft John Dow
John Snow Microsoft Tony Stark
John Dow Oracle Corp. Rick Brick
Jack Snack Amazon George Black
Dale Cooper Google Diana Smith
Company Address
Microsoft Redmond
Oracle Corp. California
Amazon Seattle
Google California
CompaniesKey: (User, Company)
FK_USERS_COMPANY
Foreign Keys
Users
User Company Manager
John Dow Microsoft Jane Dow
Duncan MacLeod Microsoft John Dow
John Snow Microsoft Tony Stark
John Dow Oracle Corp. Rick Brick
Jack Snack Amazon George Black
Dale Cooper Google Diana Smith
Company Address
Microsoft Redmond
Oracle Corp. California
Amazon Seattle
Google California
CompaniesKey: (User, Company)
FK_USERS_COMPANY
UPDATE Users SET Company = 'Microsoft'
WHERE User = Dale Cooper
AND Company = Google'
The Law of Diminishing Returns
Thank You!
@denisreznik
denisreznik@gmail.com
http://reznik.uneta.com.ua/
https://www.facebook.com/denis.reznik.5
https://www.linkedin.com/pub/denis-reznik/3/502/234

Contenu connexe

En vedette

"Посмотрим на Акку-Джаву" Дмитрий Мантула
"Посмотрим на Акку-Джаву" Дмитрий Мантула"Посмотрим на Акку-Джаву" Дмитрий Мантула
"Посмотрим на Акку-Джаву" Дмитрий МантулаFwdays
 
"Backbone React Flux" Артем Тритяк
"Backbone React Flux" Артем Тритяк"Backbone React Flux" Артем Тритяк
"Backbone React Flux" Артем ТритякFwdays
 
"От разработчика в консультанты - история одного тренера" Александр Баглай
"От разработчика в консультанты - история одного тренера" Александр Баглай"От разработчика в консультанты - история одного тренера" Александр Баглай
"От разработчика в консультанты - история одного тренера" Александр БаглайFwdays
 
Алексей Демедецкий | Unit testing in swift
Алексей Демедецкий | Unit testing in swiftАлексей Демедецкий | Unit testing in swift
Алексей Демедецкий | Unit testing in swiftFwdays
 
"The Grail: React based Isomorph apps framework" Эльдар Джафаров
"The Grail: React based Isomorph apps framework" Эльдар Джафаров"The Grail: React based Isomorph apps framework" Эльдар Джафаров
"The Grail: React based Isomorph apps framework" Эльдар ДжафаровFwdays
 
Анна Лаврова "When Fairy Tale meets Reality: Точность-надежность-дизайн"
Анна Лаврова "When Fairy Tale meets Reality: Точность-надежность-дизайн"Анна Лаврова "When Fairy Tale meets Reality: Точность-надежность-дизайн"
Анна Лаврова "When Fairy Tale meets Reality: Точность-надежность-дизайн"Fwdays
 
Ruby w/o Rails (Олександр Сімонов)
Ruby w/o Rails (Олександр Сімонов)Ruby w/o Rails (Олександр Сімонов)
Ruby w/o Rails (Олександр Сімонов)Fwdays
 
"Хероковая жизнь" Юрий Литвиненко
"Хероковая жизнь" Юрий Литвиненко"Хероковая жизнь" Юрий Литвиненко
"Хероковая жизнь" Юрий ЛитвиненкоFwdays
 
Андрей Уманский и Дмитрий Горин "Нет скучным ретроспективам! Создаём эффектив...
Андрей Уманский и Дмитрий Горин "Нет скучным ретроспективам! Создаём эффектив...Андрей Уманский и Дмитрий Горин "Нет скучным ретроспективам! Создаём эффектив...
Андрей Уманский и Дмитрий Горин "Нет скучным ретроспективам! Создаём эффектив...Fwdays
 
"Fun with JavaScript and sensors" by Jan Jongboom
"Fun with JavaScript and sensors" by Jan Jongboom"Fun with JavaScript and sensors" by Jan Jongboom
"Fun with JavaScript and sensors" by Jan JongboomFwdays
 
Александр Корниенко "Как реально построить Dream-team?"
Александр Корниенко "Как реально построить Dream-team?"Александр Корниенко "Как реально построить Dream-team?"
Александр Корниенко "Как реально построить Dream-team?"Fwdays
 
Максим Климишин "Борьба с асинхронностью в JS"
Максим Климишин "Борьба с асинхронностью в JS"Максим Климишин "Борьба с асинхронностью в JS"
Максим Климишин "Борьба с асинхронностью в JS"Fwdays
 
Павел Тайкало: "Apple watch first steps"
Павел Тайкало: "Apple watch first steps"Павел Тайкало: "Apple watch first steps"
Павел Тайкало: "Apple watch first steps"Fwdays
 
"Walk in a distributed systems park with Orleans" Евгений Бобров
"Walk in a distributed systems park with Orleans" Евгений Бобров"Walk in a distributed systems park with Orleans" Евгений Бобров
"Walk in a distributed systems park with Orleans" Евгений БобровFwdays
 
Сергей Больщиков "Angular Components: все уже за, а вы еще нет?"
Сергей Больщиков "Angular Components: все уже за, а вы еще нет?"Сергей Больщиков "Angular Components: все уже за, а вы еще нет?"
Сергей Больщиков "Angular Components: все уже за, а вы еще нет?"Fwdays
 
Маргарита Остапчук "Що нового в Windows 10 для розробників"
Маргарита Остапчук "Що нового в Windows 10 для розробників"Маргарита Остапчук "Що нового в Windows 10 для розробників"
Маргарита Остапчук "Що нового в Windows 10 для розробників"Fwdays
 
"Выучить язык программирования за 25 минут" Дмитрий Мантула
"Выучить язык программирования за 25 минут" Дмитрий Мантула"Выучить язык программирования за 25 минут" Дмитрий Мантула
"Выучить язык программирования за 25 минут" Дмитрий МантулаFwdays
 
"Эффективность и оптимизация кода в Java 8" Сергей Моренец
"Эффективность и оптимизация кода в Java 8" Сергей Моренец"Эффективность и оптимизация кода в Java 8" Сергей Моренец
"Эффективность и оптимизация кода в Java 8" Сергей МоренецFwdays
 
"From CRUD to Hypermedia APIs with Spring" Владимир Цукур
"From CRUD to Hypermedia APIs with Spring" Владимир Цукур"From CRUD to Hypermedia APIs with Spring" Владимир Цукур
"From CRUD to Hypermedia APIs with Spring" Владимир ЦукурFwdays
 
"Reducers in Action" Антон Молдован
"Reducers in Action" Антон Молдован"Reducers in Action" Антон Молдован
"Reducers in Action" Антон МолдованFwdays
 

En vedette (20)

"Посмотрим на Акку-Джаву" Дмитрий Мантула
"Посмотрим на Акку-Джаву" Дмитрий Мантула"Посмотрим на Акку-Джаву" Дмитрий Мантула
"Посмотрим на Акку-Джаву" Дмитрий Мантула
 
"Backbone React Flux" Артем Тритяк
"Backbone React Flux" Артем Тритяк"Backbone React Flux" Артем Тритяк
"Backbone React Flux" Артем Тритяк
 
"От разработчика в консультанты - история одного тренера" Александр Баглай
"От разработчика в консультанты - история одного тренера" Александр Баглай"От разработчика в консультанты - история одного тренера" Александр Баглай
"От разработчика в консультанты - история одного тренера" Александр Баглай
 
Алексей Демедецкий | Unit testing in swift
Алексей Демедецкий | Unit testing in swiftАлексей Демедецкий | Unit testing in swift
Алексей Демедецкий | Unit testing in swift
 
"The Grail: React based Isomorph apps framework" Эльдар Джафаров
"The Grail: React based Isomorph apps framework" Эльдар Джафаров"The Grail: React based Isomorph apps framework" Эльдар Джафаров
"The Grail: React based Isomorph apps framework" Эльдар Джафаров
 
Анна Лаврова "When Fairy Tale meets Reality: Точность-надежность-дизайн"
Анна Лаврова "When Fairy Tale meets Reality: Точность-надежность-дизайн"Анна Лаврова "When Fairy Tale meets Reality: Точность-надежность-дизайн"
Анна Лаврова "When Fairy Tale meets Reality: Точность-надежность-дизайн"
 
Ruby w/o Rails (Олександр Сімонов)
Ruby w/o Rails (Олександр Сімонов)Ruby w/o Rails (Олександр Сімонов)
Ruby w/o Rails (Олександр Сімонов)
 
"Хероковая жизнь" Юрий Литвиненко
"Хероковая жизнь" Юрий Литвиненко"Хероковая жизнь" Юрий Литвиненко
"Хероковая жизнь" Юрий Литвиненко
 
Андрей Уманский и Дмитрий Горин "Нет скучным ретроспективам! Создаём эффектив...
Андрей Уманский и Дмитрий Горин "Нет скучным ретроспективам! Создаём эффектив...Андрей Уманский и Дмитрий Горин "Нет скучным ретроспективам! Создаём эффектив...
Андрей Уманский и Дмитрий Горин "Нет скучным ретроспективам! Создаём эффектив...
 
"Fun with JavaScript and sensors" by Jan Jongboom
"Fun with JavaScript and sensors" by Jan Jongboom"Fun with JavaScript and sensors" by Jan Jongboom
"Fun with JavaScript and sensors" by Jan Jongboom
 
Александр Корниенко "Как реально построить Dream-team?"
Александр Корниенко "Как реально построить Dream-team?"Александр Корниенко "Как реально построить Dream-team?"
Александр Корниенко "Как реально построить Dream-team?"
 
Максим Климишин "Борьба с асинхронностью в JS"
Максим Климишин "Борьба с асинхронностью в JS"Максим Климишин "Борьба с асинхронностью в JS"
Максим Климишин "Борьба с асинхронностью в JS"
 
Павел Тайкало: "Apple watch first steps"
Павел Тайкало: "Apple watch first steps"Павел Тайкало: "Apple watch first steps"
Павел Тайкало: "Apple watch first steps"
 
"Walk in a distributed systems park with Orleans" Евгений Бобров
"Walk in a distributed systems park with Orleans" Евгений Бобров"Walk in a distributed systems park with Orleans" Евгений Бобров
"Walk in a distributed systems park with Orleans" Евгений Бобров
 
Сергей Больщиков "Angular Components: все уже за, а вы еще нет?"
Сергей Больщиков "Angular Components: все уже за, а вы еще нет?"Сергей Больщиков "Angular Components: все уже за, а вы еще нет?"
Сергей Больщиков "Angular Components: все уже за, а вы еще нет?"
 
Маргарита Остапчук "Що нового в Windows 10 для розробників"
Маргарита Остапчук "Що нового в Windows 10 для розробників"Маргарита Остапчук "Що нового в Windows 10 для розробників"
Маргарита Остапчук "Що нового в Windows 10 для розробників"
 
"Выучить язык программирования за 25 минут" Дмитрий Мантула
"Выучить язык программирования за 25 минут" Дмитрий Мантула"Выучить язык программирования за 25 минут" Дмитрий Мантула
"Выучить язык программирования за 25 минут" Дмитрий Мантула
 
"Эффективность и оптимизация кода в Java 8" Сергей Моренец
"Эффективность и оптимизация кода в Java 8" Сергей Моренец"Эффективность и оптимизация кода в Java 8" Сергей Моренец
"Эффективность и оптимизация кода в Java 8" Сергей Моренец
 
"From CRUD to Hypermedia APIs with Spring" Владимир Цукур
"From CRUD to Hypermedia APIs with Spring" Владимир Цукур"From CRUD to Hypermedia APIs with Spring" Владимир Цукур
"From CRUD to Hypermedia APIs with Spring" Владимир Цукур
 
"Reducers in Action" Антон Молдован
"Reducers in Action" Антон Молдован"Reducers in Action" Антон Молдован
"Reducers in Action" Антон Молдован
 

Similaire à Денис Резник "Relational Database Design. Normalize till it hurts, then Denormalize till it works"

Big Data: The Magic to Attain New Heights
Big Data:  The Magic to Attain New HeightsBig Data:  The Magic to Attain New Heights
Big Data: The Magic to Attain New HeightsTEST Huddle
 
[CS570] Machine Learning Team Project (I know what items really are)
[CS570] Machine Learning Team Project (I know what items really are)[CS570] Machine Learning Team Project (I know what items really are)
[CS570] Machine Learning Team Project (I know what items really are)Kunwoo Park
 
Findability Day 2014 Neo4j how graph data boost your insights
Findability Day 2014 Neo4j how graph data boost your insightsFindability Day 2014 Neo4j how graph data boost your insights
Findability Day 2014 Neo4j how graph data boost your insightsFindwise
 
Five database trends - updated April 2015
Five database trends - updated April 2015Five database trends - updated April 2015
Five database trends - updated April 2015Guy Harrison
 
PASS Summit 2010 Keynote David DeWitt
PASS Summit 2010 Keynote David DeWittPASS Summit 2010 Keynote David DeWitt
PASS Summit 2010 Keynote David DeWittGraySystemsLab
 
Drive Product Improvements with Telemetry
Drive Product Improvements with TelemetryDrive Product Improvements with Telemetry
Drive Product Improvements with TelemetryTechWell
 
DF1 - R - Natekin - Improving Daily Analysis with data.table
DF1 - R - Natekin - Improving Daily Analysis with data.tableDF1 - R - Natekin - Improving Daily Analysis with data.table
DF1 - R - Natekin - Improving Daily Analysis with data.tableMoscowDataFest
 
Big Event Looping Deck
Big Event Looping DeckBig Event Looping Deck
Big Event Looping DeckSteve Lange
 
Microsoft Windows INNOVATIVES
Microsoft Windows INNOVATIVESMicrosoft Windows INNOVATIVES
Microsoft Windows INNOVATIVESRajesh Mhade
 
SQL to NoSQL Best Practices with Amazon DynamoDB - AWS July 2016 Webinar Se...
SQL to NoSQL   Best Practices with Amazon DynamoDB - AWS July 2016 Webinar Se...SQL to NoSQL   Best Practices with Amazon DynamoDB - AWS July 2016 Webinar Se...
SQL to NoSQL Best Practices with Amazon DynamoDB - AWS July 2016 Webinar Se...Amazon Web Services
 
Thinkful DC - Intro to Data Science
Thinkful DC - Intro to Data Science Thinkful DC - Intro to Data Science
Thinkful DC - Intro to Data Science TJ Stalcup
 
Graph database Use Cases
Graph database Use CasesGraph database Use Cases
Graph database Use CasesMax De Marzi
 
Graph Database Use Cases - StampedeCon 2015
Graph Database Use Cases - StampedeCon 2015Graph Database Use Cases - StampedeCon 2015
Graph Database Use Cases - StampedeCon 2015StampedeCon
 
Microsofts Analysis
Microsofts AnalysisMicrosofts Analysis
Microsofts AnalysisD'Sean Brown
 
Introduction: Relational to Graphs
Introduction: Relational to GraphsIntroduction: Relational to Graphs
Introduction: Relational to GraphsNeo4j
 
Secrets of Enterprise Data Mining 201305
Secrets of Enterprise Data Mining 201305Secrets of Enterprise Data Mining 201305
Secrets of Enterprise Data Mining 201305Mark Tabladillo
 
MWLUG 2014: Modern Domino (workshop)
MWLUG 2014: Modern Domino (workshop)MWLUG 2014: Modern Domino (workshop)
MWLUG 2014: Modern Domino (workshop)Peter Presnell
 
L’architettura di classe enterprise di nuova generazione
L’architettura di classe enterprise di nuova generazioneL’architettura di classe enterprise di nuova generazione
L’architettura di classe enterprise di nuova generazioneMongoDB
 

Similaire à Денис Резник "Relational Database Design. Normalize till it hurts, then Denormalize till it works" (20)

Big Data: The Magic to Attain New Heights
Big Data:  The Magic to Attain New HeightsBig Data:  The Magic to Attain New Heights
Big Data: The Magic to Attain New Heights
 
[CS570] Machine Learning Team Project (I know what items really are)
[CS570] Machine Learning Team Project (I know what items really are)[CS570] Machine Learning Team Project (I know what items really are)
[CS570] Machine Learning Team Project (I know what items really are)
 
Se2017 query-optimizer
Se2017 query-optimizerSe2017 query-optimizer
Se2017 query-optimizer
 
Findability Day 2014 Neo4j how graph data boost your insights
Findability Day 2014 Neo4j how graph data boost your insightsFindability Day 2014 Neo4j how graph data boost your insights
Findability Day 2014 Neo4j how graph data boost your insights
 
Five database trends - updated April 2015
Five database trends - updated April 2015Five database trends - updated April 2015
Five database trends - updated April 2015
 
PASS Summit 2010 Keynote David DeWitt
PASS Summit 2010 Keynote David DeWittPASS Summit 2010 Keynote David DeWitt
PASS Summit 2010 Keynote David DeWitt
 
Drive Product Improvements with Telemetry
Drive Product Improvements with TelemetryDrive Product Improvements with Telemetry
Drive Product Improvements with Telemetry
 
DF1 - R - Natekin - Improving Daily Analysis with data.table
DF1 - R - Natekin - Improving Daily Analysis with data.tableDF1 - R - Natekin - Improving Daily Analysis with data.table
DF1 - R - Natekin - Improving Daily Analysis with data.table
 
Big Event Looping Deck
Big Event Looping DeckBig Event Looping Deck
Big Event Looping Deck
 
Microsoft Windows INNOVATIVES
Microsoft Windows INNOVATIVESMicrosoft Windows INNOVATIVES
Microsoft Windows INNOVATIVES
 
SQL to NoSQL Best Practices with Amazon DynamoDB - AWS July 2016 Webinar Se...
SQL to NoSQL   Best Practices with Amazon DynamoDB - AWS July 2016 Webinar Se...SQL to NoSQL   Best Practices with Amazon DynamoDB - AWS July 2016 Webinar Se...
SQL to NoSQL Best Practices with Amazon DynamoDB - AWS July 2016 Webinar Se...
 
Thinkful DC - Intro to Data Science
Thinkful DC - Intro to Data Science Thinkful DC - Intro to Data Science
Thinkful DC - Intro to Data Science
 
Entity-Relationship Queries over Wikipedia
Entity-Relationship Queries over WikipediaEntity-Relationship Queries over Wikipedia
Entity-Relationship Queries over Wikipedia
 
Graph database Use Cases
Graph database Use CasesGraph database Use Cases
Graph database Use Cases
 
Graph Database Use Cases - StampedeCon 2015
Graph Database Use Cases - StampedeCon 2015Graph Database Use Cases - StampedeCon 2015
Graph Database Use Cases - StampedeCon 2015
 
Microsofts Analysis
Microsofts AnalysisMicrosofts Analysis
Microsofts Analysis
 
Introduction: Relational to Graphs
Introduction: Relational to GraphsIntroduction: Relational to Graphs
Introduction: Relational to Graphs
 
Secrets of Enterprise Data Mining 201305
Secrets of Enterprise Data Mining 201305Secrets of Enterprise Data Mining 201305
Secrets of Enterprise Data Mining 201305
 
MWLUG 2014: Modern Domino (workshop)
MWLUG 2014: Modern Domino (workshop)MWLUG 2014: Modern Domino (workshop)
MWLUG 2014: Modern Domino (workshop)
 
L’architettura di classe enterprise di nuova generazione
L’architettura di classe enterprise di nuova generazioneL’architettura di classe enterprise di nuova generazione
L’architettura di classe enterprise di nuova generazione
 

Plus de Fwdays

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
"Distributed graphs and microservices in Prom.ua", Maksym Kindritskyi
"Distributed graphs and microservices in Prom.ua",  Maksym Kindritskyi"Distributed graphs and microservices in Prom.ua",  Maksym Kindritskyi
"Distributed graphs and microservices in Prom.ua", Maksym KindritskyiFwdays
 
"Rethinking the existing data loading and processing process as an ETL exampl...
"Rethinking the existing data loading and processing process as an ETL exampl..."Rethinking the existing data loading and processing process as an ETL exampl...
"Rethinking the existing data loading and processing process as an ETL exampl...Fwdays
 
"How Ukrainian IT specialist can go on vacation abroad without crossing the T...
"How Ukrainian IT specialist can go on vacation abroad without crossing the T..."How Ukrainian IT specialist can go on vacation abroad without crossing the T...
"How Ukrainian IT specialist can go on vacation abroad without crossing the T...Fwdays
 
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ..."The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...Fwdays
 
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu..."[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...Fwdays
 
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care..."[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...Fwdays
 
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"..."4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...Fwdays
 
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout", Anast...
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout",  Anast..."Reconnecting with Purpose: Rediscovering Job Interest after Burnout",  Anast...
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout", Anast...Fwdays
 
"Mentoring 101: How to effectively invest experience in the success of others...
"Mentoring 101: How to effectively invest experience in the success of others..."Mentoring 101: How to effectively invest experience in the success of others...
"Mentoring 101: How to effectively invest experience in the success of others...Fwdays
 
"Mission (im) possible: How to get an offer in 2024?", Oleksandra Myronova
"Mission (im) possible: How to get an offer in 2024?",  Oleksandra Myronova"Mission (im) possible: How to get an offer in 2024?",  Oleksandra Myronova
"Mission (im) possible: How to get an offer in 2024?", Oleksandra MyronovaFwdays
 
"Why have we learned how to package products, but not how to 'package ourselv...
"Why have we learned how to package products, but not how to 'package ourselv..."Why have we learned how to package products, but not how to 'package ourselv...
"Why have we learned how to package products, but not how to 'package ourselv...Fwdays
 
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin..."How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...Fwdays
 
"Leadership, Soft Skills, and Personality Types for IT teams", Sergiy Tytenko
"Leadership, Soft Skills, and Personality Types for IT teams",  Sergiy Tytenko"Leadership, Soft Skills, and Personality Types for IT teams",  Sergiy Tytenko
"Leadership, Soft Skills, and Personality Types for IT teams", Sergiy TytenkoFwdays
 
"How Ukrainian IT specialist can go on vacation abroad without crossing the T...
"How Ukrainian IT specialist can go on vacation abroad without crossing the T..."How Ukrainian IT specialist can go on vacation abroad without crossing the T...
"How Ukrainian IT specialist can go on vacation abroad without crossing the T...Fwdays
 
"Mastering cross-cultural communication", Anna Gandrabura
"Mastering cross-cultural communication", Anna Gandrabura"Mastering cross-cultural communication", Anna Gandrabura
"Mastering cross-cultural communication", Anna GandraburaFwdays
 
"Incremental rollouts and rollbacks with business metrics control at every st...
"Incremental rollouts and rollbacks with business metrics control at every st..."Incremental rollouts and rollbacks with business metrics control at every st...
"Incremental rollouts and rollbacks with business metrics control at every st...Fwdays
 
"AIRe - AI Reliability Engineering", Denys Vasyliev
"AIRe - AI Reliability Engineering", Denys Vasyliev"AIRe - AI Reliability Engineering", Denys Vasyliev
"AIRe - AI Reliability Engineering", Denys VasylievFwdays
 
"Testing of Helm Charts or There and Back Again", Yura Rochniak
"Testing of Helm Charts or There and Back Again", Yura Rochniak"Testing of Helm Charts or There and Back Again", Yura Rochniak
"Testing of Helm Charts or There and Back Again", Yura RochniakFwdays
 
"How to mentor (future) devops engineers", Vsevolod Polyakov
"How to mentor (future) devops engineers",  Vsevolod Polyakov"How to mentor (future) devops engineers",  Vsevolod Polyakov
"How to mentor (future) devops engineers", Vsevolod PolyakovFwdays
 

Plus de Fwdays (20)

"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
"Distributed graphs and microservices in Prom.ua", Maksym Kindritskyi
"Distributed graphs and microservices in Prom.ua",  Maksym Kindritskyi"Distributed graphs and microservices in Prom.ua",  Maksym Kindritskyi
"Distributed graphs and microservices in Prom.ua", Maksym Kindritskyi
 
"Rethinking the existing data loading and processing process as an ETL exampl...
"Rethinking the existing data loading and processing process as an ETL exampl..."Rethinking the existing data loading and processing process as an ETL exampl...
"Rethinking the existing data loading and processing process as an ETL exampl...
 
"How Ukrainian IT specialist can go on vacation abroad without crossing the T...
"How Ukrainian IT specialist can go on vacation abroad without crossing the T..."How Ukrainian IT specialist can go on vacation abroad without crossing the T...
"How Ukrainian IT specialist can go on vacation abroad without crossing the T...
 
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ..."The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
"The Strength of Being Vulnerable: the experience from CIA, Tesla and Uber", ...
 
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu..."[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
"[QUICK TALK] Radical candor: how to achieve results faster thanks to a cultu...
 
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care..."[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
"[QUICK TALK] PDP Plan, the only one door to raise your salary and boost care...
 
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"..."4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
"4 horsemen of the apocalypse of working relationships (+ antidotes to them)"...
 
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout", Anast...
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout",  Anast..."Reconnecting with Purpose: Rediscovering Job Interest after Burnout",  Anast...
"Reconnecting with Purpose: Rediscovering Job Interest after Burnout", Anast...
 
"Mentoring 101: How to effectively invest experience in the success of others...
"Mentoring 101: How to effectively invest experience in the success of others..."Mentoring 101: How to effectively invest experience in the success of others...
"Mentoring 101: How to effectively invest experience in the success of others...
 
"Mission (im) possible: How to get an offer in 2024?", Oleksandra Myronova
"Mission (im) possible: How to get an offer in 2024?",  Oleksandra Myronova"Mission (im) possible: How to get an offer in 2024?",  Oleksandra Myronova
"Mission (im) possible: How to get an offer in 2024?", Oleksandra Myronova
 
"Why have we learned how to package products, but not how to 'package ourselv...
"Why have we learned how to package products, but not how to 'package ourselv..."Why have we learned how to package products, but not how to 'package ourselv...
"Why have we learned how to package products, but not how to 'package ourselv...
 
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin..."How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...
"How to tame the dragon, or leadership with imposter syndrome", Oleksandr Zin...
 
"Leadership, Soft Skills, and Personality Types for IT teams", Sergiy Tytenko
"Leadership, Soft Skills, and Personality Types for IT teams",  Sergiy Tytenko"Leadership, Soft Skills, and Personality Types for IT teams",  Sergiy Tytenko
"Leadership, Soft Skills, and Personality Types for IT teams", Sergiy Tytenko
 
"How Ukrainian IT specialist can go on vacation abroad without crossing the T...
"How Ukrainian IT specialist can go on vacation abroad without crossing the T..."How Ukrainian IT specialist can go on vacation abroad without crossing the T...
"How Ukrainian IT specialist can go on vacation abroad without crossing the T...
 
"Mastering cross-cultural communication", Anna Gandrabura
"Mastering cross-cultural communication", Anna Gandrabura"Mastering cross-cultural communication", Anna Gandrabura
"Mastering cross-cultural communication", Anna Gandrabura
 
"Incremental rollouts and rollbacks with business metrics control at every st...
"Incremental rollouts and rollbacks with business metrics control at every st..."Incremental rollouts and rollbacks with business metrics control at every st...
"Incremental rollouts and rollbacks with business metrics control at every st...
 
"AIRe - AI Reliability Engineering", Denys Vasyliev
"AIRe - AI Reliability Engineering", Denys Vasyliev"AIRe - AI Reliability Engineering", Denys Vasyliev
"AIRe - AI Reliability Engineering", Denys Vasyliev
 
"Testing of Helm Charts or There and Back Again", Yura Rochniak
"Testing of Helm Charts or There and Back Again", Yura Rochniak"Testing of Helm Charts or There and Back Again", Yura Rochniak
"Testing of Helm Charts or There and Back Again", Yura Rochniak
 
"How to mentor (future) devops engineers", Vsevolod Polyakov
"How to mentor (future) devops engineers",  Vsevolod Polyakov"How to mentor (future) devops engineers",  Vsevolod Polyakov
"How to mentor (future) devops engineers", Vsevolod Polyakov
 

Dernier

Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 

Dernier (20)

Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 

Денис Резник "Relational Database Design. Normalize till it hurts, then Denormalize till it works"

  • 1. Golden Database Design Rule: Normalize till it hurts Denormalize till it works Denis Reznik Data Architect at Intapp, Inc. Microsoft Data Platform MVP http:/reznik.uneta.com.ua @denisreznik
  • 2. Database History 1960s 1970s 1980s 1990s 2000s Nowadays Object Databases RDMS Commercial Success SQL RDBMS Ingress System R E.F. Codd’s Paper CODASYL IMS NoSQL (Johan Oskarsson) (?) Google BigTable Paper Amazon Dynamo Paper
  • 3. Id UserId Name Date 1 1 Work 07/03/2014 2 2 Test 09/09/2015 4 2 Rest 12/08/2015 Id Name Phone 1 Bill +380678455732 2 John NULL 3 Mike +380501233427 Matter Client Relations (Tables) Attribute (Column) Tuple (Row) Relational Model
  • 4. Normalization • Normalization is the process of organizing the columns (attributes) and tables (relations) of a relational database to minimize data redundancy Redundancy ComplexityTable Count
  • 5. Company User Phone Phone Type Microsoft John Dow +380969785732 NULL Microsoft John Dow +32345409123 NULL Microsoft Larry McGregor +45678904692 NULL Oracle Corp. John Snow +380988958371 NULL Amazon Jack Snack +23348902385 Home Amazon Jack Snack +69058763287 Work First Normal Form (1NF) • Each cell contains an atomic value Company User Phone Microsoft John Dow Tel1: +380969785732, Tel2: +32345409123 Microsoft Larry McGregor Tel: +45678904692 Oracle Corp. John Snow +380988958371 Amazon Jack Snack Home: +23348902385 Work: +69058763287 MattersMatters
  • 6. Second Normal Form (2NF) • Table has a Key (Key = Primary Key) • All non-key columns of the relation are depend from a a whole Key Matters Company User Company Address Manager Microsoft John Dow Redmond Jane Daw Microsoft Duncan MacLeod Redmond John Dow Microsoft John Snow Redmond TonyStark Oracle Corp. John Dow California Rick Brick Amazon Jack Snack Seattle George Black Google Dale Cooper California Diana Smith User Company Manager John Dow Microsoft Jane Dow Duncan MacLeod Microsoft John Dow John Snow Microsoft Tony Stark John Dow Oracle Corp. Rick Brick Jack Snack Amazon George Black Dale Cooper Google Diana Smith Company Address Microsoft Redmond Oracle Corp. California Amazon Seattle Google California ClientsKey: (Client, Matter)
  • 7. Second Normal Form (2NF) • Table has a Key (Key = Primary Key) • All non-key columns of the relation are depend from a a whole Key Matters Company User Company Address Manager Microsoft John Dow Redmond Jane Daw Microsoft Duncan MacLeod Redmond John Dow Microsoft John Snow Redmond TonyStark Oracle Corp. John Dow California Rick Brick Amazon Jack Snack Seattle George Black Google Dale Cooper California Diana Smith User Company Manager John Dow Microsoft Jane Dow Duncan MacLeod Microsoft John Dow John Snow Microsoft Tony Stark John Dow Oracle Corp. Rick Brick Jack Snack Amazon George Black Dale Cooper Google Diana Smith Company Address Microsoft Redmond Oracle Corp. California Amazon Seattle Google California ClientsKey: (Client, Matter)
  • 8. Third Normal Form (3NF) • Every non-prime attribute of Relation is non-transitively dependent on every Key of Relation Matters Company User Manager Manager Age Microsoft John Dow Peter Parker 23 Microsoft Patrik Jones Steven Wu 45 Microsoft Jackie Adams Steven Wu 45 Oracle Corp. Ashley Grey John James 67 Amazon Scott McMillan John Smith 34 Amazon Mary Smith John Smith 34 Key: (Client, Matter)Matters Company User Manager Microsoft John Dow Peter Parker Microsoft Patrik Jones Steven Wu Microsoft Jackie Adams Steven Wu Oracle Corp. Ashley Grey Jean Claude John Smith Scott McMillan John Smith Adam Gram Mary Smith John Dow Attorneys Manager Manager Age Peter Partner 23 Steven Wu 45 Jean Claude 67 John Smith 34
  • 9. Fourth Normal Form (4NF) • Eliminates independent many-to-one relationships between columns Matters Id Company Consultant 1 Microsoft Peter Partner 2 Microsoft John Dow 3 Microsoft Amy Chen 4 Oracle Jim Beam 5 Amazon John Snow 6 Google John Snow Matters Id Company 1 Microsoft 2 Oracle 3 Amazon 4 Google Attorneys Id Consultant 1 Peter Partner 2 John Dow 3 Amy Chen 4 Jim Beam 5 John Snow MatterAttorneys CompanyId ConsultantId 1 1 1 2 1 3 2 4 3 5 4 5
  • 10. Foreign Keys Users User Company Manager John Dow Microsoft Jane Dow Duncan MacLeod Microsoft John Dow John Snow Microsoft Tony Stark John Dow Oracle Corp. Rick Brick Jack Snack Amazon George Black Dale Cooper Google Diana Smith Company Address Microsoft Redmond Oracle Corp. California Amazon Seattle Google California CompaniesKey: (User, Company) FK_USERS_COMPANY
  • 11. Foreign Keys Users User Company Manager John Dow Microsoft Jane Dow Duncan MacLeod Microsoft John Dow John Snow Microsoft Tony Stark John Dow Oracle Corp. Rick Brick Jack Snack Amazon George Black Dale Cooper Google Diana Smith Company Address Microsoft Redmond Oracle Corp. California Amazon Seattle Google California CompaniesKey: (User, Company) FK_USERS_COMPANY UPDATE Users SET Company = 'Microsoft' WHERE User = Dale Cooper AND Company = Google'
  • 12. The Law of Diminishing Returns

Notes de l'éditeur

  1. Domain Key
  2. 1NF Goal: Columns, Rows and cells are used as they were designed for Attribute: Store domain (structural) information Tuple: Store Data Cell: Store atomic value
  3. 2NF Goal: Keys should be irreplaceable Example: A car and a key
  4. 2NF Goal: Keys should be irreplaceable Example: A car and a key
  5. 2NF Goal: No transitive dependency Example: