Basic Database Design: List of Type Instances

This is a beginner's question about database design. Let's say we have a blog blog with many users, each with multiple blog posts. We want to quickly find all articles written by a given user. We could search the post table for all blog posts with a given user id. We could also design a user table to have a list of user posts. This would mean perhaps storing a comma-separated string of message IDs. What is the correct way to do this?

0


source to share





All Articles