拥有订阅者功能的最佳方式是什么? 我应该在用户或订阅页面下存储订阅/订阅者列表吗?

I have a list of pages and a list of users. A user can subscribe to any number of pages and a page can have any number of subscribers. How should I store the subscriptions? Have each user have a list of their subscriptions or have each page have a list of its subscribers? The tough part that I need to get around is easy searchability. A page must display its list of subscribers and a user must have a list of their subscriptions. But if the data is stored one way, then it is harder to get to the other way. How would you get around this problem?

Many-To-Many relationships are traditionally stored using a Junction Table.

Have two columns, both foreign keys, one being the primary key of the user table and the other being the primary key of the page table. Then either have a seperate primary key, or make your primary key a composite of the two foreign keys.

You can then join in either direction across the three tables.