DC - Database structure
View Single Post
12-11-2007, 04:41 PM
Join Date: Nov 2007
You're model seems incomplete. You have a users table, but no username, fullname, password, etc.
Also, you'll want a one-to-many relationship between your tutorials and comments table. With the way you have things set up, it seems like each tutorial can only have one comment. I would probably make a bridge table between the tutorials and comments table.
- id (PK)
- id (PK)
Same would go for your recipes table.
And I'm getting confused with the tutorials table. You have category_ID and tutorial_category_ID. Same with your comments table. I also don't think the category_ID is needed in your comments table since you would be getting the category name from the tutorials table when you join the two.
That way, you could have as many comments per tutorial as you wish. All you would have to do is join both table and easily get all comments for tutorial_id
Although, I would like to get a second opinion.
View Public Profile
Send a private message to bdm
Find More Posts by bdm