How to create a simple relational database
This video explains how to create a link between Microsoft Access tables to facilitate the first steps in a relational database. The video also explains how to view and edit the join properties feature and run queries based on different join options.
All our courses offer after course support via email and video, which is the format shown below. To book a course email email@example.com or call 01670 732139. Courses can be delivered onsite using our laptops or at our training venue in Gateshead.
Before you can link tables you must create a primary key and a foreign key to use as links. Once that has been achieved, select the Database tools options from the ribbon and drag the tables you require on to the screen. Once the tables are on the screen you should see the primary key and the foreign key. Drag from one to the other, it does not matter which way round you do it. You will now see the Edit Relationship box. Make sure you select the Enforce Referential Integrity option, this will stop orphan records being created. Also check that the relationship is what you require, One to Many, One to One or Many to Many relationship. In the video example there is a One to Many link in use.
Once you have created your links you can now create a query based on your related tables. When you run a query where data comes from more than one table, you will only see records that appear in both related tables. However, if you change the join type to 2 or 3 to create either an outer or inner join, then the data displayed will include none related records as well.