11. Designing my Databases
I finished my website mock ups today, and I can see the big picture now.
Thank you Balsamiq! I finished 14 webpage mockups and 2 webpage template mockups. More than seeing the layout of the end product, it also helped me see the essential functions and databases I needed to create to make everything work well together.
Before, when making the website worked was more important than planning the website, I didn’t think much of the design of the database. I made sure that whenever I had problems with my query, Google was there to help me.
It also helps to plan the databases, tables and the columns to make it easier in the future whenever I want to retrieve something.
Liking and Tagging: Simple yet not simple
For example, this is the first time I am making a Like/Unlike system from scratch with MySQL, PHP and JQuery. So essentially I will have a Like Table which includes like_id, post_id, and user_id. This keeps track of the like actions of users.
But there are 3 different kinds of posts that user can like in my website: questions, resources, and blog posts. So I will have 3 different Like tables so that it will be easier in the future to query each.
This is also the first time I will be using a Tagging system. I want users to be able to follow certain tags. Posts will have tags on them. And users who like such tags will be recommended posts with such tags.
List of tables in my database
- Comment to Question
- Comment to Answer
- Comment to Resource
- Comment to Blog
- List of Tags
- Question Tag
- Resource Tag
- Blog Tag
- Like Actions
- Question Like
- Resource Like
- Blog Like
17 Tables! Only thinking of this makes eyes big. I only have 8 days to:
- create databases
- connect databases
- create 14 functioning webpages
- make said webpages beautiful
My coding adventures will continue.
#100daysofwritinghonestly #the100daysproject Day 11