Creating Tables in MySQL 5 with Foreign Keys

preview_player
Показать описание
So we have looked at installing MySQL on SLE 11. So now we need a database and tables. We will also add Primary and Foreign Key constraints to the tables. Primary Keys ensure uniqueness of a column values within a table sot hat the row can re identified and Foreign keys ensure integrity by allowing values to be added that exist in another table. For example an employee can only be added to a department that exists.
Рекомендации по теме
Комментарии
Автор

this is a piece of diamond!! a rare type of tutor who should be in the Global stage of teaching anyone...Iam African who taught in Sudan, Gulf region and UK now...you are a rare Prof. it is a v honest comment. Pls more and online for everyone..thanks forever...

khalifamak
Автор

Wow, thanks! Now I understand foreign keys better! Thank you!

reyariass
Автор

My friend, if you don't mind my saying so..., you are incredible. :)

Foaman
Автор

Awesome...how easy you navigate and show that...!! God bless..!

jonalice
Автор

Mr Penguin - yer awesome! thank you for all you

gapu
Автор

I was having some trouble in my Db when adding the foreign key, my code was correct and I could not figure out what was going on, because even though I set up the foreign key I was still able to Add an item which did not exist but thanks to this vid I realized.
Even if the code is correct but if the Engine is not InnoDb it continues to allow to add unexisting items.

gamedevnow
Автор

I have created a Table but now want to add foreign key out one of those Headings, Someone please help me to create it after creating table.

nkdastudio
Автор

Thanks, great tutorial it helped me a lot ;)

deividas
visit shbcf.ru