phppup Posted Wednesday at 09:37 PM Share Posted Wednesday at 09:37 PM Are there any guides/tutorials online that you would recommend to upgrade my skills? I've found several but nothing that was spectacular. One site started Quote Unless you have a good reason not to, a 1:1 relationship usually indicates that you’d be better off combining the two tables’ data into a single table. Does this seem like an accurate statement? Quote Link to comment Share on other sites More sharing options...
Barand Posted Wednesday at 09:47 PM Share Posted Wednesday at 09:47 PM It seems reasonable to me, given the initial caveat. Quote Link to comment Share on other sites More sharing options...
requinix Posted Wednesday at 10:10 PM Share Posted Wednesday at 10:10 PM "Don't do a thing unless you have a good reason to do the thing" is all-around pretty reliable advice. Quote Link to comment Share on other sites More sharing options...
phppup Posted Wednesday at 10:28 PM Author Share Posted Wednesday at 10:28 PM I would have thought that less columns translates to faster/more efficient searching. If I have id, name, email, phone, birthday, favorite_color as fields then these are all 1:1. But if I primarily refer to id, name, and email, I would think a 1:1 with a table of "personal_details" would seem appropriate. Quote Link to comment Share on other sites More sharing options...
Solution Barand Posted Wednesday at 10:43 PM Solution Share Posted Wednesday at 10:43 PM (edited) 17 minutes ago, phppup said: I would have thought that less columns translates to faster/more efficient searching. So just, for example, "SELECT id,name, email FROM ..." so you only retrieve what you need. That's why you shouldn't use "SELECT * " in queries as that retrieves every column, need it or not, and slow your queries. [EDIT] PS That's one of the reasons not to use SELECT *. Edited Wednesday at 10:46 PM by Barand Quote Link to comment Share on other sites More sharing options...
phppup Posted Wednesday at 11:00 PM Author Share Posted Wednesday at 11:00 PM It's starting to make more sense. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.