I want to store about 100k rows of data, and all data some common field. All data have a category and other fields is base on category.
For example if data is in category 1, It had extrafield1
and extrafield2
I search and found two way for storing data.
1-Name value pair
Table1
ID Name Category Field2 Field3
1 Name1 1 Value Value
2 Name2 2 Value Value
Table2
ID Table1_ID Name Value
1 1 extrafield1 1
2 1 extrafield2 2
3 1 extrafield3 3
4 2 extrafield4 4
5 2 extrafield5 5
2-Parent Child table
Table1
ID Name Category Field2 Field3
1 Name1 1 Value Value
2 Name2 2 Value Value
Tableforcategory1
ID Table1_ID extrafield1 extrafield2 extrafield3
1 1 1 2 3
Tableforcategory2
ID Table1_ID extrafield4 extrafield5
1 2 4 5
So my question is when use method 1 and when use method 2.