V Posted May 20, 2010 Share Posted May 20, 2010 After following several tutorials I still can't grasp the concept of relational databases. I was able to learn and understand advanced techniques and how to query simple data from tables but when it comes down to linking tables, for example topics with certain categories, I get lost. I'm desperately asking for a noob-proof relational DB tutorial, if anyone knows one. Quote Link to comment https://forums.phpfreaks.com/topic/202400-a-good-relational-database-tutorial/ Share on other sites More sharing options...
Mchl Posted May 20, 2010 Share Posted May 20, 2010 How about this one? http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html Quote Link to comment https://forums.phpfreaks.com/topic/202400-a-good-relational-database-tutorial/#findComment-1061196 Share on other sites More sharing options...
V Posted May 20, 2010 Author Share Posted May 20, 2010 Thanks for the link! The tutorial was a little difficult to follow but i dissected the whole process on paper from my own noob perspective than compared it to how it's actually done and it matches I'm finally starting to understand db relations. I have just one question if you don't mind.. For example I have a table for movie genres and another for movie titles.. and I want to query each title under its appropriate genre. In movie genres I have 2 columns: genre_id (primary, a.i) genre_name and in movie titles: movie_id (primary, a.i) genre_id (foreign key) movie_title I make my databases in phpmyadmin. For the foreign key "genre_id" is there something I need to do in phpmyadmin? Quote Link to comment https://forums.phpfreaks.com/topic/202400-a-good-relational-database-tutorial/#findComment-1061319 Share on other sites More sharing options...
Mchl Posted May 20, 2010 Share Posted May 20, 2010 No. Unless you're using InnoDB and want to use foreign key constraints, but it's a bit more advanced topic, so perhaps you should leave it for another day Quote Link to comment https://forums.phpfreaks.com/topic/202400-a-good-relational-database-tutorial/#findComment-1061326 Share on other sites More sharing options...
V Posted May 20, 2010 Author Share Posted May 20, 2010 Nice! Thanks. I'll post my first db relation query in the beta testing section soon and make you proud! lol Quote Link to comment https://forums.phpfreaks.com/topic/202400-a-good-relational-database-tutorial/#findComment-1061337 Share on other sites More sharing options...
ignace Posted May 20, 2010 Share Posted May 20, 2010 Apparently you didn't follow the tutorial thoroughly: movie_id (primary, a.i) genre_id (foreign key) movie_title It's not uncommon for a movie to fit under multiple genre's like IMDB shows you. http://www.imdb.com/title/tt1228705/ Quote Link to comment https://forums.phpfreaks.com/topic/202400-a-good-relational-database-tutorial/#findComment-1061341 Share on other sites More sharing options...
V Posted May 20, 2010 Author Share Posted May 20, 2010 Ignace, were you paid by Marvel studios to link Iron Man? lol they're plugging that movie everywhere.. made strictly for $$$ no passion .. I think.. haven;t seen it anyways, are you referring to "one to many relationships" ? Quote Link to comment https://forums.phpfreaks.com/topic/202400-a-good-relational-database-tutorial/#findComment-1061370 Share on other sites More sharing options...
ignace Posted May 20, 2010 Share Posted May 20, 2010 No, I was actually referring to a many-to-many relationship as: - one genre has many movies and - one movie has many genres And yes I get paid by Marvel to SPAM that link everywhere and tell everyone how awesome that video, just for doing so I get 1K for every referral. I only just hit $1M Quote Link to comment https://forums.phpfreaks.com/topic/202400-a-good-relational-database-tutorial/#findComment-1061377 Share on other sites More sharing options...
V Posted May 21, 2010 Author Share Posted May 21, 2010 damn I make a quarter of that referring Furry Vengeance.. I should look into many-to-many soon, thanks for the example Quote Link to comment https://forums.phpfreaks.com/topic/202400-a-good-relational-database-tutorial/#findComment-1061431 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.