This is personal study note
Copyright and original reference:
https://www.youtube.com/watch?v=1A4xokAaxa4&list=PLVsNizTWUw7HhYtI-4GGmlJ5yxNdwNI_X
================================================================================
Waterfall model for software development model
================================================================================
Database modeling:
- Extract features from each object in real world
- Create tables using those features
================================================================================
Not only the object, you also need to create table for action like "buying product",
for example, custormer_A purchased product_B
================================================================================
================================================================================
Make the customers (who didn't buy the product) in upper parts
L-shape table:
- disadvantage: there are wasteful spaces
================================================================================
Split L-shape table into 2 groups (customer table, buy table)
Note that there are duplicated custormer data
================================================================================
Remove duplicated customer data
Customer name can be primary key (PK)
================================================================================
Buy table with customers' name
================================================================================
Parent table: customer table
Child table: buy table
Those tables have relationship, and it shows like this
김범수 in customer table can buy 3 products in buy-table (1:N relationship of customer table and buy table)
================================================================================
Finally, architect 2 tables (userTBL, buyTBL)