hi all. i’m designing below db with INNODB, is relation of that correct? this is small and simple blog system
- post can be have any category
2)user can have and create any post
hi all. i’m designing below db with INNODB, is relation of that correct? this is small and simple blog system
2)user can have and create any post
user has-many blog
blog belong-to a user
blog belong-to a category
user(id,…);
blog(id,uid,cate_id,…); // this is just suitable for a category has many blog and blog belong to a category–not many categories
category(id,title…);
if you want there exists "many-many" relations between blog and category ,you should introduce a bridage table :
category(id,title…) , category_blog(cate_id,blog_id);