I am building a feed (rss, twitter, other services, etc) aggregator with LAMP. It is very similar to Google Reader in that people can add as many feeds as they want and then be able to read their feeds, sort them, view individual feeds, or groups of feeds at once.
I have built this type of service before but for a small, limited group of people where the ENTIRE group had access to all of the aggregated feed items. So, it was pretty straightforward.
This time however, I am building a service to which people can subscribe so I will have potentially (ideally) thousands of users and 10's of thousands of feeds, and in-turn, millions of feed items.
My approach for the database schema (simplified) is this:
users (id, name, ...)
feeds (id, name, url, ...)
feed_items (id, title, timestamp, feed_id, ... )
user_feeds (id, user_id, feed_id, ...)
However, being that a user can subscribe to 100's of feeds I am trying to plan out the best and most optimized way to query the database for the feed_items of feeds they have subscribed to (or subsets of).