Relationships

Dealing with relationships in MySql is not as straightforward as either MS Access or as you would have hoped for. Creating simple primary keys isn’t too difficult

However foreign keys are more complex and require the following code in the table creation code:

This will ensure that you can only add foreign_ids when they exist in the foreign table.

About CDB 361 Articles
Self-Employed Software Developer, Spark, Property Management, Hobby Forestry, Ex-Teacher, Engineering - Wood, Metal, Electrics & Computers. Outdoors - Walk, Cycle, Kitesurf,

Be the first to comment

Leave a Reply

Your email address will not be published.


*


This site uses Akismet to reduce spam. Learn how your comment data is processed.