VarunKrish

Denormalize or Normalize ?

I was working with MySQL during the weekend and suddenly I had to solve a most commonly faced problem – Storing Multiple values for a field in a foreign table and using them in the current table using indexes / foreign keys.

table1

id

post_title

table2

post_id

tag_id

table3

tag_id

tag_name

If i go on doing the same thing for my current mysql project requirement I might end up having so many tables (God knows how I will benefit from using the 3NF for my database schema)

I have some ways to reduce the no of tables by storing

CSV (Comma Seperated Values)
val1,val2,val3 or

Space Seperated Values

val1 val2 val3

Anyone ?

Exit mobile version