Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Genuine question, what are the alternatives?


You have columns that refer to the PKs of other tables, just without constraints. So your invoice table would have a column `user_id`, which tells you which user the invoice is for. But if you enter an invoice for user ID 999,999 when you have no users, the database eats it happily, since it has no opinion as to what that data should be.


In this case, they use "foreign keys" in the sense that there are keys which correspond to keys in other tables.

There are no foreign key constraints, the keyword is never used.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: