i really confused what to do and need your suggestions for my DB Design.
First of all,
As you see in the table, i have id,name,eventCategory,totalEvents and date . This table name is InitPlayer. InitPlayer is an eventAction and i have 3 more eventAction.
As you see in the table, eventCategory items always repetated because dates are changed.
First i though that i keep eventCategory as a table and retrieve items according to them.
What is your DB design suggestions acccording to this picture? Thank you
Lastly,
First i though that i keep eventCategory as a table and retrieve items according to them.
Hold that thought, and do it. Then create a UserInitEventCategory
table, where you link userInit.ID
to eventCategory.ID
.
I think you should normalize the crap out of your database.
If you're continually reusing the same eventCategory
items, you should make a little table, store their names in there, eventCategories
, with eventCategory_id
and eventCategory_title
fields (or something similar), then just reference the ID of said eventCategory
in the initPlayer
table or create a table to references both initPlayer
IDs and eventCategories
IDs.
Normalizing and separating will help you to maintain order within your database and help keep you sane. You'll have a little more work with your queries, but it's worth it if you want to scale, or say, change the name of a specific eventCategory.