Hello,
I'm trying to join two tables for

www.cs75.net

project 2 (users, history), but i
read that JOIN isn't a good practice and will eventually be bad if
your tables get larger.
so i created new tables as the following:
http://pastebin.com/MBzCM1Wv
used a foreign key.
the question now am i on the right track?
is JOIN real problematic with larger tables?
is FK any better than JOIN?

another method my friend pointed me to but its also condusing:
http://pastebin.com/ukidpCTP

he doesn't join or use a FK but he told me to use php to fill everything because table relations are slow...

I am really confused about MySQL i don't know how to design my tables. is there any reliable book or source to learn from other than the MySQL manual cause i am a beginner and the manual isn't friendly...

Thanks in advance.

JOIN is a part of a clause for querying related tables, not for design.
You are on the right track. Use foreign keys wherever possible to enhance database integrity. No, they don't harm the performance except with large insert or update operations. But unless you have millions of users you won't notice any difference.
When learning mysql make use of the command line mysql client rather than using phpmyadmin or other higher level interfaces. They do a good job but you don't know what your are doing in terms of data definition and manipulation langugage.

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.