Lets say you have Users table and Posts table.
Users
id
name
email
Posts
id
contents
user_id
If I add index to "user_id" in Posts table, and set it as NOT NULL, Can I expect same effect as Foreign Key?
I know that I can set user_id as any number, whereas foreign_key will force you set valid id. Let's assume that user_id is valid. Is there any performance benefit when we set foreign_key?