Top "Foreign-keys" questions

Foreign keys are a data integrity feature of relational (and SQL) databases.

MySQL foreign key constraints, cascade delete

I want to use foreign keys to keep the integrity and avoid orphans (I already use innoDB). How do I …

mysql foreign-keys innodb
Show constraints on tables command

I have tables that I've tried setting PK FK relationships on but I want to verify this. How can I …

mysql foreign-keys
Migration: Cannot add foreign key constraint

I'm trying to create foreign keys in Laravel however when I migrate my table using artisan i am thrown the …

laravel laravel-4 foreign-keys migration eloquent
Can table columns with a Foreign Key be NULL?

I have a table which has several ID columns to other tables. I want a foreign key to force integrity …

sql mysql database foreign-keys
Introducing FOREIGN KEY constraint may cause cycles or multiple cascade paths - why?

I've been wrestling with this for a while and can't quite figure out what's happening. I have a Card entity …

.net entity-framework foreign-keys ef-code-first entity-framework-4
How to establish ssh key pair when "Host key verification failed"

I have set up ssh key pairs between my desktop and two servers, and from the servers to my desktop, …

ubuntu ssh foreign-keys
How to find foreign key dependencies in SQL Server?

How can I find all of the foreign key dependencies on a particular column? What are the different alternatives (graphically …

.net sql-server foreign-keys
Is it fine to have foreign key as primary key?

I have two tables: User (username, password) Profile (profileId, gender, dateofbirth, ...) Currently I'm using this approach: each Profile record has …

database foreign-keys primary-key
How to find all tables that have foreign keys that reference particular table.column and have values for those foreign keys?

I have a table whose primary key is referenced in several other tables as a foreign key. For example: CREATE …

mysql foreign-keys