selliottsxm Posted April 5, 2014 Share Posted April 5, 2014 When setting up foreign keys is there a problem with the foreign key in table b (for example) that is linked to a primary key in table A, also being a primary key? Or is it a better idea to set up a surrogate primary key for Table B? Link to comment Share on other sites More sharing options...
HartleySan Posted April 5, 2014 Share Posted April 5, 2014 If you think about it, having the same primary key for two tables is bad design because you could just as easily combine the two tables, as the data associated with the primary keys in both tables would still be unique to each primary key in one table. As such, if you find that you're using the same exact primary keys for two tables, you should combine them. That make sense? Link to comment Share on other sites More sharing options...
selliottsxm Posted April 5, 2014 Author Share Posted April 5, 2014 Yes it does. It had just occured to me and I was logging back into to delete the message. Thanks for all your help! The last time that I designed a website interacting with a database was in '97 using Cold Fusion Link to comment Share on other sites More sharing options...
HartleySan Posted April 5, 2014 Share Posted April 5, 2014 Hey, it's all good. I noticed that you live in Nanaimo, BC. That's pretty cool. I was thinking about maybe moving the family out to Vancouver someday. There a lot of good web dev opportunities out there for people that know PHP/MySQL and JavaScript really well? Thanks. Link to comment Share on other sites More sharing options...
selliottsxm Posted April 5, 2014 Author Share Posted April 5, 2014 Heya, I'm not sure but I would imagine that there is a lot of opportunity. Check out CraigsList. Also of course there is the "virtual office" situation. So many times I've contracted design and programming out to people I've never met face to face. Vancouver is real expensive though. Nanaimo, even Victoria, much less so. Love it here It's wonderful having the mountains and the sea. We had a pod of killler whales in Departure Bay (Nanaimo) twice already this year. If you google it I'm sure you'll see the pictures. Such an incredible thing to see. Let me know if you need any info on BC! Steve Link to comment Share on other sites More sharing options...
HartleySan Posted April 5, 2014 Share Posted April 5, 2014 Thanks, Steve. I might hit you up down the road for more info on everything. Thanks again. Link to comment Share on other sites More sharing options...
Recommended Posts