I think I realized today that I've been going about things entirely backward. I've spent the last little while trying to use software to generate an ER diagram for me from my database only to find that the relationships weren't being created in the diagram. After a little googling I think I've reached the conclusion that I've been going about things the wrong way. However; I'm merely going about things the way I recall being taught... so there's that.

I'm using phpMyAdmin to create my database.

here's an example

Author - has primary key authorID, name, bio
Books - has ISBN and authorID as primary keys as well as a few other attributes.

Today I realized that maybe I should be setting these as foreign keys, I'm just not sure how it all works. Any sort of noob tutorial you can link to or advice would be great. Thanks.

authorID in the books table is the foreign key in Books table which refers to the primary key of the Author table.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.