A FOREIGN KEY is a field (or set of fields) in one table that refers to the PRIMARY KEY in a different table. The child table is the one with the foreign key, while the referred or parent table is the one with the primary key.
A foreign key (FK) is a column or set of columns used to create and enforce a link between data in two tables in order to limit the amount of data that may be stored in the foreign key table.
In relational database design, the FOREIGN KEY constraint is critical. It allows us to link data based on our requirements. It also helps us determine what to do with ON UPDATE and ON DELETE actions done on the rows of the primary table because it introduces certain dependencies between the columns of the primary and foreign tables.
Foreign keys do have an influence on INSERT, UPDATE, and DELETE statements because they execute data checks, but they also increase a database's overall performance. Foreign keys' main advantage is that they guarantee data consistency, which means that they keep the database clean.
At the data level, foreign keys assist maintain referential integrity. They also help with performance because they're usually indexed. Create an index if you require one, but FKs should not be used for this purpose.
Learner's Ratings
4.3
Overall Rating
61%
27%
2%
0%
10%
Reviews
S
Shaik sarmath
5
is this course sutiable for b.com?
B
Boobalan A
4
I want this course for english. Classes are superb. but not understand few places, because I don't know hindi.
A
Aish Dubey
5
Perfect for beginners and explained in Hindi
M
Mohsin Salim Kazi
5
Great for beginners
C
Chandan Kumar
5
very good
S
Saurabh Virkud
4
Thank you learnvern ..
V
Vikash Chaudhary
5
This site is very usefull for everyone.
V
vj tricks
5
This course is very good
S
Sanjeev Rana
5
Please provide course notes
A
Ankit Patel
5
Thank you learnvern and learnvern is best platfrom a lern a new skill. again thank you.
Share a personalized message with your friends.