Hi,
Not completely sure if this is what you are looking for.
But say, you have a table "users": id, name
and you want to keep track of the data inserted in table data, you create a field UserNr in the table Inserts, and you query:
Select * from users, inserts where (users.id = inserts.usernr) and (user.name = $name)
This is a one-to-many relationship.
For a many to many relationship you need to add a lookup-table, which holds identifiers from both linked tables:
table1.id -- table2.table1nr..table2.table3nr -- table3.id
Which you can query in similar fashion as above.
J.