[eluser]TheFuzzy0ne[/eluser]
Hi everyone. Please accept my apology for the title of this post being so vague. I honestly have no idea of a better suited title.
I have an organiser application, which allows the user to keep track of certain activities they have done. By default, the user has no rows in the database, but could potentially have up to 46. The information for the tasks is stored in a separte table.
I'm not entirely sure how to handle the MySQL statements. If I populate the database with 46 rows the very first time they use the app, I can update them accordingly, but that will leave lots of rows that contain the number 0 (meaning not complete), which to me seems like a waste of space.
If I don't do it the above way, I can't see any simple way to update the rows that need it and to insert the ones that don't exist.
The only other option I can think of, would be to delete all of the user's data, before inserting the new rows, but I don't think that this is too smart, especially when you consider the overhead it may cost.
All of my ideas set alarm bells ringing in my head, which is why I believe the method I need to use is none of the above. What am I missing?
I'd appreciate any pointers from any seasoned MySQL users out there. I've been using MySQL for a while now, but I've never really had to solve this problem before. I'd like to keep my database lean, tidy and cleanly designed. Is this a question of database design, or do I just not know enough about how to use MySQL?