Professional Documents
Culture Documents
Lecture 4 - Relational Data Modeling
Lecture 4 - Relational Data Modeling
Lecture 4 - Relational Data Modeling
TECHNOLOGY
UNIVERSITY LAB
Fact Tables
UJ
4. Dimension Tables
5. Schema Models
l. Star Schema
Snowf ake Schemas
NJ
* Formal Definition:
• A set of related data and the way it is organized.
Data Integrity
(Once a transaction is completed, change is persistent)
• Simplicity
• Intuitive Organization
• OLAP queries
• "How many shoes were sold in Lahore in a specific month."
• OLTP queries
• "The price of the shoe."
• Normalization
• To reduce data redundancy and increase data integrity.
• Denormalization
• Combine multiple tables in order to facilitate faster queries
• Must be done in read heavy workloads to increase performance
Sales table
We do not want a single giant table
Name Amount
Amanda 100.00
Sales table
There should be a way to link these
Name Amount
tables together. The tables are
Amanda 100.00
linked together with foreign keys.
Toby 50.00
Sales table
Toby 50.00
How to Reach 2nd Normal Form 001 005 Mary mja n e@yx s. com
• No transitive dependencies
Awards Table Lead Singer
Music Year Winner Record
Award of Year Band Name Lead Singer
Using all the attributes from the original relation requires joining
these smaller tables.
DENORMALIZED
DATA AHEAD
DR. FAISAL KAMIRAN INFORMATION TECHNOLOGY UNIVERSITY
Denormalization
Normalization Denormalization