easyStudy question · answer published in Data Modelling interview questions, so no pointssqldata-modelling
What a foreign key enforces
You add FOREIGN KEY (user_id) REFERENCES users(id) to the orders table. What does this constraint guarantee?
Discussion 0
Join free to post in the discussion.
Related questions
- Stopping SQL injectionBackend Developer
- Purpose of a database indexBackend Developer
- Rows returned by a LEFT JOINBackend Developer
- Atomicity in a money transferBackend Developer
- COUNT and AVG with NULLsBackend Developer
- Filtering grouped resultsBackend Developer
- Storing times for global usersBackend Developer
- Embed or reference in MongoDBBackend Developer