How about, I'm making a database with different tables which depend linearly. I show them next.
Within each table there may be several activities that depend on other activities. I just added the many-to-many relationship tables, however, I don't know what code to use to create another table that tells me if a father has several children and that more than one child can have the same father. The variables that matter to me are the id and the Pre (Precedents).
Greetings, I tell you that in the case of parents and children, I see it as a one-to-many relationship and it could be as follows:
And just to maintain the link, the foreign key is the id of the parent that I save in each record that I make in the children table (the previous code is an example, adapt it if it suits your needs)