V
V
vladislav9972020-09-12 12:31:50
Database design
vladislav997, 2020-09-12 12:31:50

How to properly design a database with subscriptions?

Tell me, I want to implement subscriptions on the site to accounts, how to design it correctly?
I see only one option: create a separate table:
id | *column who subscribed* | *column who subscribed to*
and make a many-to-one or one-to-many connection. Will this be the correct solution, or is there another way?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dr. Bacon, 2020-09-12
@bacon

Yes, such a table is a standard solution, it doesn't even need an id.

and make a many-to-one or one-to-many connection
What does "do" mean? You have already made this table many-to-many

V
Vladimir Korotenko, 2020-09-12
@firedragon

Only other people can follow a person. Actually, that's all. No need to complicate

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question