mysql relationships question
Im very new to mysql, and I'm trying to do a small database to link campers to addresses and specific camps and such. I know about setting primary keys and such, but one point eludes me. How does mysql actually link info in different tables properly? I have a name table, an address table, a camp table, and so on, but when I enter data into each of these tables seperately, how does mysql know what camp a person is in? I have the primary key name_id, and in every other table, I have this as a secondary key, as my manual explains to do, but it never explains how mysql will know what data goes together. Sorry this is so vague, I know so little I don't really know what it is I don't know. I've read lots of material on this, but nothing really covers this simple question.
|